How to automatically set meta-tags?

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 :slightly_smiling_face:

Is this in a published build? I remember the iframe we use causes some issues, can you try running without the iframe please?

If the URL is: https://playcanv.as/p/adm70VcR/

Then add an e/ before the p
https://playcanv.as/e/p/adm70VcR/

Also, please submit a bug report in the Editor repo, this is something we should really fix: https://github.com/playcanvas/editor/issues

When running without the iframe, the meta tags aren’t applied at all. I will submit a bug report