wonday/react-native-orientation-locker

Landscape mode on iPad.

jimmy123A opened this issue · 1 comments

Locking to landscape mode on iPad devices is not working properly here. Upon testing on iOS 13.5 it appears to just switch for a second and then immediately falls back to portrait. On iOS 16.0 it doesn't do anything.

here is my code:

export default function App() { return ( <View style={styles.container}> <Text>Open up App.tsx to start working on your app!</Text> <OrientationLocker orientation={LANDSCAPE} onDeviceChange={orientation => console.log('onDeviceChange', orientation) } /> </View> ); }

Hello , Try adding infoplist to your app.json file instead of using this library :

"infoPlist": { "UISupportedInterfaceOrientations": "UIInterfaceOrientationPortrait" }