react-native-orientation-locker icon indicating copy to clipboard operation
react-native-orientation-locker copied to clipboard

Landscape mode on iPad.

Open jimmy123A opened this issue 2 years ago • 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> ); }

jimmy123A avatar Jun 11 '23 15:06 jimmy123A

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

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

YassineOujaa77 avatar Jun 26 '24 12:06 YassineOujaa77