-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: orientation on iOS16 #413
base: master
Are you sure you want to change the base?
Conversation
}]; | ||
|
||
[Orientation setOrientation:UIInterfaceOrientationMaskLandscapeRight]; | ||
[self lockToOrientationWithMask:UIInterfaceOrientationMaskLandscapeRight interfaceOrientation:UIInterfaceOrientationLandscapeRight deviceOrientation:UIDeviceOrientationLandscapeRight]; | ||
} | ||
|
||
RCT_EXPORT_METHOD(unlockAllOrientations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to update unlockAllOrientations
to -
RCT_EXPORT_METHOD(unlockAllOrientations)
{
#if DEBUG
NSLog(@"Unlock All Orientations");
#endif
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
[Orientation setOrientation:UIInterfaceOrientationMaskAllButUpsideDown];
[self lockToOrientationWithMask:UIInterfaceOrientationMaskAllButUpsideDown interfaceOrientation:UIInterfaceOrientationMaskAllButUpsideDown deviceOrientation:orientation];
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gramiro - Any update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey, guys please update ASAP. we are stuck here for the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi guys, sorry, been a while. @QSuraj I didn't include this since it was not in the original library
Other than iOS 16, Builds are failing. |
same issue for me iOS builds are failling. |
Fixed failing build by wrapping ios 16 code with Here's a patch file I made if you're using patch-package https://gist.github.com/nicolas6422/80cbc4528b4d4798c53ffdd2f56c3625 |
works on ios 16 |
@nicolas6422 do you know if that's future proof? Like next year's iOS 17? |
@gramiro yes, |
@gramiro @nicolas6422 any update for release mode because its not working for release mode. |
Seeing the same issue that this doesn't work in release mode |
@codal-mpawar ran into a similar issue, for us we build our app with eas so it was about setting the |
@gramiro If you have a solution can you please fork the library and try to resolve this if possible? it will great help for us. |
seems the camera screen is also orientated, is any way to fix? |
hii as any one found solution I am also facing issue related to orientation locktolandscape not working Please @LuczDev if you found any solution please respond asap thanks |
Did you find solution for release mode? |
I've modified
Orientation.m
according to what Apple is requiring on iOS16 since[[UIDevice currentDevice] setValue:forKey:];
appears to be buggy.Notice that the changes are under a condition of the OS being
iOS16
.