yamill / react-native-orientation

Listen to device orientation changes in react-native and set preferred orientation on screen to screen basis.
https://www.npmjs.com/package/react-native-orientation
ISC License
1.72k stars 809 forks source link

Locking orientation and xcode orientation #241

Open craigcoles opened 6 years ago

craigcoles commented 6 years ago

I have been trying to get orientation locking working within my app for a day or two now. I could not get it to work for love nor money. After trying everything else, uninstalling and reinstalling multiple times, I noticed that all orientations were ticked inside XCode. I decided to deselect one and retried and locking orientations began to work.

Is there any reason why having all orientations ticked causes the locking to stop working? Just wanted to highlight this as it might be a reason why others can't get this plugin to work.

andrerfneves commented 6 years ago

@craigcoles I don't think I've run into an issue like that. What version of RN, RNOrientation and iOS are you using? Would love to test this out.

craigcoles commented 6 years ago

Tested on two versions of RN: 0.47.1 and 0.49.3 RNOrientation version: 3.1.0 iOS Version: 10.3