react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

RN app closed state in iOS

Open fmcruz opened this issue 6 years ago • 3 comments

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

  1. 0.61.5 RN
  2. OneSignal 3.6.4 added with yarn

fmcruz avatar Apr 04 '20 17:04 fmcruz

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!

rgomezp avatar Apr 07 '20 20:04 rgomezp

Closing due to no response

rgomezp avatar Apr 22 '20 20:04 rgomezp

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.

stu-dev avatar Jun 07 '20 18:06 stu-dev