Portrait-only on iPhone, all orientations on iPad

  1. SDK Version: 40 or 41, Managed Workflow
  2. Platforms(Android/iOS/web/all): iOS

Our app needs to be portrait-only on an iPhone. On an iPad however, we would like to support all screen orientations.

This should be possible on iOS, see here:

It should also be possible in React Native:

So I tried it with the following app.json ios section:

      "infoPlist": {
        "UISupportedInterfaceOrientations~ipad": [
          "UIInterfaceOrientationLandscapeRight",
          "UIInterfaceOrientationLandscapeLeft",
          "UIInterfaceOrientationPortrait",
          "UIInterfaceOrientationPortraitUpsideDown"
        ]
      }

However, the app is still locked to portrait mode on the iPad.

How can I get portrait mode on iPhone and all orientations on an iPad?

Found the answer: remove "orientation": "portrait" from app.json, then add the following to the ios node:

      "infoPlist": {
        "UISupportedInterfaceOrientations~iphone": [
          "UIInterfaceOrientationPortrait"
        ],
        "UISupportedInterfaceOrientations~ipad": [
          "UIInterfaceOrientationLandscapeRight",
          "UIInterfaceOrientationLandscapeLeft",
          "UIInterfaceOrientationPortrait",
          "UIInterfaceOrientationPortraitUpsideDown"
        ]
      }
2 Likes

Thanks for following up and sharing the solution with the community! We also appreciate when developers do that here.

Cheers,
Adam

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.