I’m trying to get a fairly complex, existing codebase (base SDK iOS 9.0; Swift 4.0; Xcode 9.1) to run in full-screen mode on iPhone X, and so far, it only runs in “compatibility mode” (i.e., letterboxed with black top and bottom borders).
However, a brand-new Xcode project meeting the same requirements runs in full-screen mode fine.
There also seems to be a fair amount of ambiguity and/or misinformation regarding when an app running on iPhone X actually displays in “compatibility mode” vs. full-screen mode.
Some of the variables may include:
... and possibly more.
Apart from what Apple (and others) say, has anyone definitively isolated precisely which permutation(s) of parameters ‘flips the switch’, and causes the app to run in one vs. the other when on iPhone X?
[Please note: for business reasons, and at least for the moment, we still want the app to be able to run on iOS 9 and up.]
Many thanks in advance!
To break out of the letterbox on iPhone X, your app needs:
Making use of Safe Area guides isn't part of getting out of the compatibility mode letterboxing, but it is essential to making sure your UI properly fits on iPhone X after you get out of compatibility mode. For many apps, just doing steps 1 and 2 above will result in UI that stretches to fill the whole screen, hiding important controls behind (or uncomfortably close to) the rounded corners, home indicator, and sensor notch.
And as @rmaddy notes, you can still build with the iOS 11 SDK and deploy back to the less than 10% (and rapidly falling, as of this writing) of iOS devices on iOS 9, just set the Minimum Deployment Target in your Xcode project and make sure that any use of iOS 10 and iOS 11 APIs is guarded by availability checks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With