Android + react-native-screens + createNativeStackNavigator not keeping orientation on SDK 41.
See original GitHub issueSummary
After upgrading to SDK 41, I started noticing that my portrait app went landscape only on Android devices (I tested it on two android devices).
I looked for the bug and it’s due to an issue in the react-native-screens library that I believe is a regression:
https://github.com/software-mansion/react-native-screens/issues/836
I’ve tried all the fixes the others have tried in the ticket, but NOTHING worked for me. Maybe I missed something or maybe something special needs to be done for Expo Managed apps?
I made an MCVE so you guys can see what’s happening. For some reason this wasn’t happening on SDK 40.
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
41
Environment
Expo CLI 4.4.4 environment info: System: OS: macOS 11.1 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.12.0 - /usr/local/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Managers: CocoaPods: 1.10.1 - /Users/aryk/.rvm/gems/ruby-2.6.0/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 IDEs: Android Studio: 4.0 AI-193.6911.18.40.6514223 Xcode: 12.5/12E262 - /usr/bin/xcodebuild npmPackages: expo: ^41.0.0 => 41.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 npmGlobalPackages: expo-cli: 4.4.4 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
fork is fine too. but patch-package is easier imo
Great, I’ll give this a shot. As far as making the change.
Is it enough if I just fork the package, make the one line change and then build with EAS, right?
@cruzach mentioned something about using patch-package, but I’m hoping just a straightforward fork and pointing my package.json to the right sha like
https://github.com/Aryk/react-native-screens.git#54e852095b
is enough.