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

onNotificationOpenedApp not trigger and getInitialNotification getting null on iOS after added ClearTap #375

Open
kukadiyaAni opened this issue Feb 26, 2024 · 5 comments
Assignees

Comments

@kukadiyaAni
Copy link

I'm using clevertap-react-native:1.2.1 and after setting up ClearTap, stop getting the default firebase onNotificationOpenedApp event when tapping on notification and getInitialNotification returns null when clicking on notification and the app is closed

it was working fine before setup ClearTap

Note: When sending notifications from FCM not from ClearTap and it's happen only iOS, Android works fine

For handling ClearTap push notifications click the event below code

CleverTap.addListener(CleverTap.CleverTapPushNotificationClicked, (e)=>{/*consume the event*/})

This event trigger when app force close and tap on notification but if app is active in background then above method is not trigger.

@nishant-clevertap
Copy link
Contributor

Hi @kukadiyaAni

Can you answer following to investigate it:

  1. Which SDK is ClearTap which you have mentioned? Can you mention their documentation?
  2. How have you integrated CleverTap SDK? Do you have used autoIntegrate or manually integrate SDK?
  3. Are you able to get notification callback in all states(foreground, background, killed) when push is sent from CleverTap in iOS?
  4. Can you share debug enabled CleverTap logs in case of app is active in background.

@kukadiyaAni
Copy link
Author

@nishant-clevertap Thanks for your time

  1. Which SDK is ClearTap which you have mentioned? Can you mention their documentation?
    => "clevertap-react-native": "^1.2.1"
    => https://developer.clevertap.com/docs/react-native
    => https://developer.clevertap.com/docs/react-native-push-notification

  2. How have you integrated CleverTap SDK? Do you have used autoIntegrate or manually integrated SDK?
    => We just yarn clevertap-react-native and added the method as per documentation and documentation mentioned in above

  3. Are you able to get a notification callback in all states(foreground, background, killed) when a push is sent from CleverTap in iOS?
    => Yes, I got and I also got a notification tap event as well but after Integrated ClearTap all firebase notification callback and event stop woking as I mention in question onNotificationOpenedApp and getInitialNotification

@nishant-clevertap
Copy link
Contributor

@kukadiyaAni
Can you try integrating CleverTap SDK manually as mentioned here in doc:
https://developer.clevertap.com/docs/push-notifications-ios#manually-integrating-push-notification-support

@kukadiyaAni
Copy link
Author

@nishant-clevertap you shared documentation for iOS, we have an issue in iOS but we are using react-native, we need an event in react-native side

@nishant-clevertap
Copy link
Contributor

@kukadiyaAni
You will also have AppDelegate file in React native in iOS, You have to add methods in that file only as mentioned in doc.

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

3 participants