customerio / customerio-reactnative

MIT License
23 stars 11 forks source link

Unable to listen to notification taps with expo-notifications after upgrade to customerio-reactnative 3.4.0 #239

Closed miguelespinoza closed 4 months ago

miguelespinoza commented 4 months ago

SDK version:

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

Are logs available?

nope

Describe the issue

After upgrading to 3.4.0, was able to successfully listen to events in the background using expo-notifications. But now, foreground notifications do not work. Specifically Notifications.addNotificationResponseReceivedListener which is used to grab the payload and support navigation routing. I know customerio-reactnative supports universal links, but we opted-out of that, as our mobile app is designed to use a custom_data payload

Screenshots

Additional context

"expo-notifications": "~0.18.1"
nicholas-patterson commented 4 months ago

I am also using 3.4.0 and I cannot get logs for Notifications.addNotificationResponseReceived or addNotificationReceivedListener. I am using a bare app, with expo-notifications. I am not using the customerio-expo-plugin. Using react-native-notifications listeners seemed to work for me.

mrehan27 commented 4 months ago

Thank you for reaching out and sharing the concern. Starting with version 3.4.0, if autoTrackPushEvents is not set or is set to true, other SDKs will not have their callback functions invoked for pushes sent from Customer.io. If the push was not sent from Customer.io, then third-party SDKs should have their callback functions called as expected.

I've internally added a +1 to the feature request for callbacks on your behalf (for both of you). As a workaround to receive callback when push from Customer.io is clicked, you can utilize deep links until the callback feature is available.

Please don't hesitate to reach out if you have any further questions.

miguelespinoza commented 4 months ago

on another note, somewhat similar, I'm not getting much love over at the rails gem for customerio, so wanted to direct some attention to this issue: https://github.com/customerio/customerio-ruby/issues/113

I'm betting, it's something I'm doing wrong, was hoping for some pointers by the customer.io team

miguelespinoza commented 4 months ago

After a long journey working with customer.io's RN SDK, I opted into customer.io's native deep linking capabilities. Works great, but then I encountered this blocker where deep linking with remote badge counts do not work.

@mrehan27 / @levibostian, I'd love to get some support eyes on this. Any other information that can help escalate this, I'm more than happy to help triage this issue.

EDIT: I figured it out. wrong position of CIO.push 🤦

mrehan27 commented 4 months ago

Hey @miguelespinoza. Happy to hear it worked out for you. If you need any further help, please let me know, and I can ask someone from the team to take a closer look and get back to you for the mentioned issue.

miguelespinoza commented 4 months ago

@mrehan27 would love your thoughts on this issue I just posted: https://github.com/customerio/customerio-reactnative/issues/243

seems a recurring problem, curious if this is still an ongoing problem with the latest versions of reactnative and expo-plugin libraries

mrehan27 commented 4 months ago

Hey @miguelespinoza, Thanks for sharing. We've replied to the ticket you linked. Please don't hesitate to ask any further questions you might have. We are actively tracking both issues and will continue to offer our support to better assist you.

miguelespinoza commented 4 months ago

Thanks! I'm closing this issue. Ultimately I opted-in to customer.io's native deep link support. For anyone having issues with deep links on cold start, make sure to include handleDeeplinkInKilledState in your app.json Expo config ✌️