summaryrefslogtreecommitdiffstats
path: root/mkspecs/macx-ios-clang/Info.plist.app
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-01 16:06:02 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-03 16:31:54 +0200
commit1126efed7d2d75d90ff16046d5c1cc7ead2390f2 (patch)
treeb25af165459b60a8a1f68d8ecce3ed599e3da0b8 /mkspecs/macx-ios-clang/Info.plist.app
parent613c2f92b8c679a7dd2958b949579f5f94d3e608 (diff)
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 <richard.gustavsen@digia.com>
Diffstat (limited to 'mkspecs/macx-ios-clang/Info.plist.app')
-rwxr-xr-xmkspecs/macx-ios-clang/Info.plist.app7
1 files changed, 7 insertions, 0 deletions
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 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
</dict>