Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to set app orientation based on device without ejecting from Expo?

$
0
0

I'd like to lock my app to portrait mode on iPhone and enable both portrait and landscape on iPad.

I know you can easily do this by updating info.plist on Xcode, but is it possible to set these preferences without ejecting from Expo? After ejecting, I got hundreds of errors on Xcode and my builds keep failing so I'd prefer to keep things as is if possible.

Here are the relevant parts of my app.json file.

{
  "expo": {
    "sdkVersion": "35.0.0",
    "platforms": ["ios"],
    "version": "1.0.0",
    "orientation": "default",
    "ios": {
      "bundleIdentifier": "BUNDLE-IDENTIFIER",
      "supportsTablet": true
    }
  }
}

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>