Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking.getInitialURL returns null when deep linking on cold start (iOS - customerio-reactnative 3.4.0) #243

Closed
miguelespinoza opened this issue Mar 1, 2024 · 3 comments
Assignees

Comments

@miguelespinoza
Copy link

SDK version:

"customerio-expo-plugin": "^1.0.0-beta.15"
"customerio-reactnative": "^3.4.0"

Environment: Production. But on Development my Expo app never runs, just gets stuck on a white screen which makes it virtually impossible to debug unfortunately. This behavior only happens when I click a customer.io push notification.

Are logs available?

Unfortunately not because in Development I get a white screen

Describe the bug

Using customer.io's deep link strategy works when the app is active or in the background. It properly redirects to the correct screen.

When the app is closed/killed, the deep links stop working.
There's been several reports about this, but their pretty old, so figured this could be something with the new versions.
I'm not using any other third party library, like @react-native-firebase, @notifee/react-native. I do have expo-notifications, but hasn't interfered with deep links when app is opened, so can't imagine much interference when app is closed.

I should note, I'm using branch.io for deferred deep linking and it works when app is closed, so I imagine there's some data exchange issue with the customer.io SDK, could be wrong.

To Reproduce

  1. Setup customer.io with deep link support
  2. Close the app
  3. Send a customer.io push notification with a deep link.
  4. Click on the push notification, opens app, does not redirect to the screen based on the deep link

Expected behavior

When the app is closed it should redirect to the screen based on the deep link

Screenshots

Additional context

@ami-aman
Copy link
Collaborator

ami-aman commented Mar 4, 2024

Hi @miguelespinoza, thanks for reaching out!

Have you tried our troubleshoot solution described here? We are aware of a deep link issue that prevents an app to open expected screen when the app is in the killed state. This is because of the lifecycle difference of native and react native platforms ! I can assist you further if this solution doesn't work for you !

@miguelespinoza
Copy link
Author

@ami-aman, I figured it out. Looks like I had to pass handleDeeplinkInKilledState into the customerio-expo-plugin configuration. Unfortunately, that was not documented in the docs.
Just an fyi, the docs will have to be updated for future developers.

@ami-aman
Copy link
Collaborator

ami-aman commented Mar 6, 2024

I'm happy to hear you fixed the issue! 🎉

Customer.io provides a configurable property called handleDeeplinkInKilledState. When enabled, this property allows the SDK to automatically handle deep links when your app is closed or in the killed state. You can find more details about this feature in the Configure the plugin section of our documentation.

I'll go ahead and close this ticket, but feel free to reopen it if you have any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants