Ok so before the problems we were having were only on iPhoneX in landscape orientation, portrait orientation displayed correctly, I released a game in portrait mode that worked great. Today I try testing a new portrait orientation game on iPhoneX and now portrait orientation is broken?!? There is a gap at the top of the viewport and the status bar always shows up.
https://imgur.com/a/qi0a7u8
Things to note
1. Whether or not you check hide status bar in the C3 export dialog, when you open your xcode workspace, hide status bar is ALWAYS unchecked in the settings.
2. Checking hide status bar in Xcode does not fix the problem, the status bar always shows up.
3. Setting viewport-fit to either cover or auto, the game still shows up the same, white bar at the top and status bar showing.
twg Ashley
I found a fix for this. I really wonder why they take so long to fix this. This is not what i should do, i should be playing at graphics and designing games, not looking at some core code.
Put the misery aside.
Fix:
Go to your www/c2runtime.js
line 5761 and add this code inside:
var metaelement = document.querySelector('meta[name~="viewport"]');
var metacontent = metaelement && metaelement.getAttribute("content");
if(!metacontent.includes("cover")){
offy = (h - newh) / 2;
h = newh;
}
Isnt "cover" suppose to cover the top and not scaling it?! For the landscape part i didnt test. I leave it to the development team.
Image version: