react-native-sdk
react-native-sdk copied to clipboard
Iterable push notification can't work
I'm following the setup with the "Installing Iterable's React Native SDK" step and I'm testing with android devices. But I can't receive any push notification through the Iterable campaign and test push. Also, by using the "getLastPushPayload" function there's no returning JSON back.
Testing push notifications with @react-native-firebase/messaging works fine. I'm wondering the push notification is broken on Iterable react-native SDK, does anyone also facing this problem?
having the same problem.
having the same problem.
Hello, @tonuegbu ! Thanks for your comment.
I have some test below for Iterable react-native SDK:
- The old one I created with the same react-native versions (0.62.2): none of the push work
- Create a new project with RN version 0.62.2: front and back push works
- Create a new project with the latest version of RN: the setEmail function doesn't work; no device token has been created. But the event track can work?!
- Create a project with RN version 0.64.1: front push doesn't work but backend works...
All the setting is the same for these four RN project.
I think maybe you can try to build a new project to have a test.
We had similar issues recently with Android because of the SDK using FirebaseInstanceId which is now deprecated (https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceId).
We had to add firebase-iid as a dependency to get Android working again. Thread with the solution we used can be found here: https://github.com/mixpanel/mixpanel-android/issues/744
Hope it helps!
You may need to remove all @react-native-firebase/messaging
content to make it work.
I'm also facing this problem, seems like @react-native-firebase/messaging package is not viable for Iterable? This is a big concern since most react native apps use this package on both platforms
@cparki3 solution might help, however, my team has some conflicts with using that pacakge, and it sent us down a rabbit hole of problems that caused more pain than the solution would have been worth.
Would love to hear from the @iterable team to see some kind of support for use with Firebase messaging, as it is a very widely used package
If someone have this issue. My issue was that I managed to make it work but only when app is in background / closed, and it only showed text.
In order to make it work with rich notifications and in foreground add service to AndroidManifest
, like this:
<application>
...
<service
android:name="com.iterable.iterableapi.IterableFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
Have a good day!
Has there been any progress for this issue?
Same problem here with iOS. No token registered after call Iterable.setEmail()