[SOLVED] Viewport Fit for IPhone - Overwriting Meta Tags

Hi PlayCanvas Community,

Is there an easy way to overwrite the index.html file before exporting the project?

I’d like to add " viewport-fit=cover to the viewport meta tag, explained here: https://webkit.org/blog/7929/designing-websites-for-iphone-x/


Not that I know of. You will unfortunately have to do that as a post build step.

Hi @yaustar

Thanks for the quick reply. So I think it’s in the correct category as a valid Suggestion then - so we can enjoy fullscreen games on iPhone X :wink:


Doing it post-build is a valid solution for now, but within a production setup it’s quite a quick-fix and pain.

@will Maybe it would be possible to add a flag to set the viewport fit mode within the rendersettings?

An even better solution would be to have an optional index.html which acts as “template”, like the loadings screen. So one can alter the meta tags to add iPhone X Fullscreen functionality, but even embedd small scripts (post-build), e.g. small tracking/analytics scripts.

Just as a suggestion. Have a great day,


1 Like