Our SwiftUI word game shows a "screen too small" warning on small iPhones, and the same size check gates one feature. We originally read UIScreen.main.bounds. On iPhone Duo the app runs on the inner display (669 x 871 pt), but UIScreen.main returned the cover display's size, so the warning fired on the largest iPhone screen there is.
We now read the size from the active window scene's screen instead, which fixes it. Two questions:
-
Is the active window scene's screen the supported way to get the size of the display the app is actually on, or is there a better API (e.g. reading the size from the SwiftUI view hierarchy instead)?
-
For roughly the first second after launch, the Duo reports the scene's screen bounds transposed (871 x 669 instead of 669 x 871). Re-reads a second later are correct. Is that expected, and what is the right moment or signal to read a trustworthy size at launch?