react-native-orientation
react-native-orientation copied to clipboard
Use of private API
This framework uses private API.
[[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationLandscapeRight] forKey:@"orientation"];
This is the equivalent of calling setOrientation:
which is private. On top of the bad user experience, this risks apps being rejected from the App Store.
@LeoNatan can you provide some documentation on that if you have a source? Thanks
I’m not sure what documentation you want.
Look at UIDevice
documentation:
https://developer.apple.com/documentation/uikit/uidevice/1620053-orientation?language=objc
Officially the orientation
property is read-only. Any attempt to set it is private API.
Hmm, I've managed to get accepted for our past 5 or so versions. Are there alternatives to this?
That’s not an indication that Apple won’t block your app in the future. -[UIDevice setOrientation:]
has been known to cause app rejections in the past. Look for that in Stack Overflow.
The correct way to achieve this on iOS is to use a UIViewController
and control orientation from there. That’s a little challenging with RN but not impossible.
Hi, any news about this? I see that this issue is still open