Hello, in my game I have added meta tags using javascript
window.parent.document.querySelector("meta[name=viewport]").setAttribute("content", "width=device-width, height=1024, user-scalable=yes, initial-scale=1, viewport-fit=cover");
This works fine but to make it work you have to rotate your device to landscape then portrait again for it to work. I came up with a slight fix
window.alert("iOS fix successful!");
window.parent.document.querySelector("meta[name=viewport]").setAttribute("content", "width=device-width, height=1024, user-scalable=yes, initial-scale=1, viewport-fit=cover");
Adding an alert fixes this once you cross it off, but is there a way to do this without an alert? I can’t seem to figure this out.
Thank you for any help