I have app in react native on iOS which I locked it on landscape mode by doing this:
componentDidMount() {
Orientation.lockToLandscape()
}
I added a popover window but when I press on it im getting this error:
Exception thrown while executing UI block:
Supported orientations has no common orientation with the application,
and [RCTModalHostViewController shouldAutorotate] is returning YES
on app.delegate I added this function:
- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
while ([[UIDevice currentDevice] isGeneratingDeviceOrientationNotifications]) {
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
}
return [Orientation getOrientation];
}
on portrait this error doesn't happened
How can I fix it... thank you