From 1126efed7d2d75d90ff16046d5c1cc7ead2390f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 1 Oct 2014 16:06:02 +0200 Subject: iOS: Set up default Info.plist to support all interface orientations When the UISupportedInterfaceOrientations key is missing, iOS will start up the application in the orientation defined by UIInterfaceOrientation, and if that key is also missing, it will default to portrait orientation. Unfortunately, when the application has finished launching on an iPad, there is no way to re-evaluate the current device orientation unless the user actively rotates the device, so for example if the device is physically in landscape orientation, and the application is started up in portrait, the application will not auto-rotate to landscape after starting up. It would seem that [UIViewController attemptRotationToDeviceOrientation] would be the right API to do this, but even after telling the device to beginGeneratingDeviceOrientationNotifications the device orientation will still match the startup orientation until the device is physically rotated. For iPod/iPhones this is not an issue, as the OS will update the device orientation after startup. Presumably the difference in behavior between the two device classes is due to the iPad supporting any orientation for the application grid. Since we would prefer the application to either start up in the right orientation directly, or at least rotate to it after startup, and the latter can't be done, we apply UIInterfaceOrientationMaskAll to the Info.plist file. This also has the benefit that the application will show any splash screens in the right orientation. Change-Id: If0421bc7b82b7f14a510fa1f34eac4f6407f570f Reviewed-by: Richard Moe Gustavsen --- mkspecs/macx-ios-clang/Info.plist.app | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mkspecs/macx-ios-clang/Info.plist.app b/mkspecs/macx-ios-clang/Info.plist.app index 0c4220e38f..2987804e33 100755 --- a/mkspecs/macx-ios-clang/Info.plist.app +++ b/mkspecs/macx-ios-clang/Info.plist.app @@ -24,6 +24,13 @@ 1.0 LSRequiresIPhoneOS + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + NOTE This file was generated by Qt/QMake. -- cgit v1.2.3