Enable landscape mode for iPad/tablet using react-native

Viewed 560

I am working on a requirement where the mobile device would support only portrait mode while the tablet/iPad supports both portrait and landscape mode, I am not sure how to achieve the requirement using react-native

1 Answers

For iOS, including the following lines in the ios/Info.plist file should do it:

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>

<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationLandscapeRight</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
Related