react-navigation.github.io
react-navigation.github.io copied to clipboard
Question: Missing instructions for react-native-screens installation in iOS?
Current behavior
Hi! Looking at the react-native-screens
installation guide for iOS, I see there is one extra step to properly set it up, which includes adding some handlers to the AppDeletegate.mm
to start listening for orientation notifications. However, this step is not documented in the react-navigation docs.
Considering react-navigation depends on react-native-screens, I was wondering whether this is something we should add to our app as well.
Link to the installation guide: https://github.com/software-mansion/react-native-screens#ios
Expected behavior
Either clarifying in the react-navigation docs that this step is not necessary, or adding it as part of the installation process in the docs.
Reproduction
https://github.com/software-mansion/react-native-screens#ios
Platform
- [ ] Android
- [X] iOS
- [ ] Web
- [ ] Windows
- [ ] MacOS
Packages
- [ ] @react-navigation/bottom-tabs
- [ ] @react-navigation/drawer
- [ ] @react-navigation/material-bottom-tabs
- [ ] @react-navigation/material-top-tabs
- [X] @react-navigation/stack
- [ ] @react-navigation/native-stack
Environment
- [x] I've removed the packages that I don't use
package | version |
---|---|
@react-navigation/native | 6.0.11 |
@react-navigation/native-stack | 6.7.0 |
react-native-safe-area-context | 4.3.1 |
react-native-screens | 3.17.0 |
react-native-gesture-handler | 2.5.0 |
react-native-reanimated | 2.9.1 |
react-native | 0.69 |
node | 16.10.0 |
npm or yarn | 7.24.0 |
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link, a www.typescriptlang.org/play link or link to a GitHub repo under your username).
Can you provide a minimal repro which demonstrates the issue? Please try to keep the repro as small as possible and make sure that we can run it without additional setup.
A repro will help us debug the issue. The issue will be closed automatically after a while if you don't provide a repro.
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
-
@react-navigation/native
(found:6.0.11
, latest:6.0.12
)
Can you verify that the issue still exists after upgrading to the latest versions of these packages?
cc @kacperkapusciak
Hey @santitopo 👋
It's complicated.
UIKit's documentation clearly states that calling beginGeneratingDeviceOrientationNotifications
is required for orientation to properly work but we didn't have this anywhere in our codebase and it worked either way for months (years?).
Recently, someone reported an issue that calling this method is indeed required in his application to work correctly. Adding this to AppDelegate
is an intermediate that anyone can do without a new version of screens but I hope it's possible to have this step done internally in rn-screens
instead.
Fixed in https://github.com/software-mansion/react-native-screens/pull/1596