Hello Guys,
When using Xcode 14 (RC or 14.0.1) the Native Screen size differ from simulator to real device for the brand new iPhone 14 Pro and Pro Max causing my apps some bugs (because using the real device screen size for some computations).
Just after app launch:
log.info("Canevas Size: \(UIScreen.main.bounds.width) x \(UIScreen.main.bounds.height)")
log.info("Native Size: \(UIScreen.main.nativeBounds.width) x \(UIScreen.main.nativeBounds.height)")
Result
iPhone 14 Pro (Simulator Output):
Canevas Size: 393.0 x 852.0
Native Size: 1179.0 x 2556.0
iPhone 14 Pro (Real Device):
Canevas Screen Size: 390.0 x 844.0
Native Screen Size: 1170.0 x 2532.0
-
Does anyone reproduce that? I do not own myself a real iPhone 14 Pro and can't investigate any further sadly.
-
Do you know how I can get the real screensize in pixels?
Thanks to geoffhackworth (https://twitter.com/geoffhackworth) it seems that Xcode-14 TestFlight builds are treated as Xcode 13 builds and are scaled to the 12/13 Pro layout.
So the issue will only occurs for TestFlight build.
Thank you geoffhackworth (https://twitter.com/geoffhackworth)
More about this here: https://twitter.com/geoffhackworth/status/1573652281848905728