wonday / react-native-orientation-locker

A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
MIT License
761 stars 274 forks source link

Landscape mode on iPad. #262

Open jimmy123A opened 1 year ago

jimmy123A commented 1 year ago

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 (

Open up App.tsx to start working on your app! console.log('onDeviceChange', orientation) } />

); }`

YassineOujaa77 commented 5 months ago

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

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