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

IOS orientation

Open leon2835 opened this issue 5 years ago • 3 comments

Hi there, currently i'm added android:screenOrientation:"Portrait" on Android Manifest, and uncheck landscape options on Xcode to only allow portrait mode. But one of my screen need to set into landscape. For Android is working, but IOS not working. Any comment? Thank You. *RN0.60 Screen Shot 2019-08-16 at 12 57 55 Screen Shot 2019-08-16 at 12 59 47

componentDidMount() { Orientation.lockToLandscape() }

componentWillUnmount() { Orientation.lockToPortrait() }

leon2835 avatar Aug 16 '19 04:08 leon2835

Check xcode for these check boxes:

image

brianephraim avatar Aug 23 '19 22:08 brianephraim

same issue here. Android works fine, but on iOS I can not lockToLandscapeLeft. The methods seems to be called because I get a "Locked to Landscape Left" on the debug console in XCode.

"Landscape Left" is checked in General / Deployment Info.

RN: 0.60.5 react-native-orientation-locker: 1.1.6

voxspox avatar Sep 30 '19 11:09 voxspox

@voxspox please double check your manual linking for iOS at AppDelegate.m, I was having the same problem and it was because those lines were missing... and be sure that you ran pod install

swizes avatar Oct 15 '19 17:10 swizes