Context: I have inherited a legacy app still running in Swift 3, part of the AppDelegate
looks like this:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// ...some other code here
window = UIWindow(frame: UIScreen.main.bounds)
// ...even more other code here
print(window?.frame, UIScreen.main.bounds)
return true
}
Regardless of the device used - from iPhone 5S to iPad Pro (3rd gen) - the output is always the following:
Optional((0.0, 0.0, 320.0, 568.0)) (0.0, 0.0, 320.0, 568.0)
Does anyone have any idea as to why such a thing might happen?
Update
Further investigation has revealed that neither the LaunchImages nor LaunchScreen.storyboard are to blame, but instead a directory of pngs that essentially override LaunchScreen.storyboard somehow. The app's UIWindow bound is taken from the dimensions of these pngs somehow!!! I am continuing to investigate further, but if anyone has any ideas in the meanwhile I would be grateful, thank you.