when I tried IOS orientation rotate lock, app is force closed
Description
https://github.com/wonday/react-native-orientation-locker
When I use react-native-orientation-locker and lockToLandscapeRight() IOS app is force closed.
I think this library bug, but It's bug start 0.69.6 and It occurs at 0.70.X.
So I think react-native's bug.
Version
0.69.6
Output of npx react-native info
System: OS: macOS 13.0 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 176.94 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/jhkim/.rvm/gems/ruby-2.7.4/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 16.0.1 - /usr/local/opt/openjdk/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.69.6 => 0.69.6 react-native-macos: Not Found npmGlobalPackages:
Steps to reproduce
https://github.com/wonday/react-native-orientation-locker
When I use react-native-orientation-locker and lockToLandscapeRight() IOS app is force closed.
Snack, code example, screenshot, or link to a repository
Orientation.lockToLandscapeLeft();
Hi @jihokim2 Thanks for reporting this issue.
It seems like this issue is actually unrelated to React Native core. Please open this issue against the repository you linked:
https://github.com/wonday/react-native-orientation-locker/issues
I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native.
I doubt this line
+#import "Orientation.h"
@implementation AppDelegate
// ...
+- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
+ return [Orientation getOrientation];
+}
@end
If I want to rotate orientation programmatically, app is force closed.
And I doubt https://github.com/facebook/react-native/commit/7d42106d4ce20c644bda4d928fb0abc163580cee cause this problem.
Could you see this problem?
And If this problem cause react-native, plz reopen this issue.
I can't reopen this issue.
@cortinico
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.