wonday/react-native-orientation-locker

IOS 12 crashing when calling Orientation.lockToLandscape()

Opened this issue · 2 comments

When we call Orientation.lockToLandscape() in iOS 12 the app crashes and throws the following error: "Supported orientations has no common orientation with the application, and [UIViewController shouldAutorotate] is returning YES".

When debugging, the exception happens after executing this line:

[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationLandscapeRight] forKey:@"orientation"];

This does not happen in newer versions of iOS.

Has anyone faced this problem? Thanks in advance.

@facugu1998 Did you get a chance to solve this issue?

@facugu1998 Did you get a chance to solve this issue?

We had to set minimum version of ios to 13.