yamill/react-native-orientation

After module install all orientations are unlocked

vvusts opened this issue · 4 comments

I am using fork of this repository.
@dirkdev98 @dov11 @mathijslightbase @rodymolenaar
My app is locked to portrait mode only.
After installing module all orientations are unlocked why this xcode setting is overwritten?
I need to detect orientation changes in only one screen is this possible?

Are you trying to make one screen allow portrait and landscape orientations or just trying to listen to the current position the phone is held in?

I'm having the same issue. I'm trying to allow only one screen to allow portrait and landscape mode, and this causes all screens to allow orientation change, thus overriding the settings in XCode.

This doesn't happen on Android. My AndroidManifest settings are still working properly.

Edit:
This is an easy fix in my case, as I just use Orientation.lockToPortrait() when my app starts, then make sure to relock when I leave the screen that has landscape.

Orientation.lockToPortrait (), I just tested on iOS 13 con both iPad Pro (12.9) third-generation simulator and the real device, it doesn't lock anything, I'm calling this function if my device is a tablet, and the locking is not working, any idea why?

Hey @oscar-gallog 👋 You probably got an answer already, but I fixed this issue by checking the "Requires full screen" checkbox on Xcode !