RN app closed state in iOS
When RN app is in a closed state in iOS, tapping a push notification that carries a deep link URL, doesn't trigger getInitialURL in RN. If the app is in focus, or in background everything runs smoothly. If using directly tapping on the URL in Safari correctly opens the app and triggers the getInitialURL.
What may be the issue?
Environment
- 0.61.5 RN
- OneSignal 3.6.4 added with yarn
It looks like there may be some issues with getInitialUrl (https://github.com/facebook/react-native/issues/24429). Not sure if related.
You can always use the callback of the notification-opened function to get launchUrl and then pass that into wherever it is being used e.g: React Router.
We recommend using our additional data functionality.
Please take a look at our documentation regarding deep-linking for more info: https://documentation.onesignal.com/docs/links
Enjoy!
Closing due to no response
I am experiencing the same issue, deeplinking works on android no problem (either through notification and manually) and also works on iOS if i create a deep link for my app in notes app or on the simulator via the xcrun command.
It just does not work when trying to deeplink via a push notification app_url property on iOS.