Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Firebase notification not arriving on iOS for FCM token with length 163

$
0
0

I am working on a react native project which uses FCM token to register a phone against a profile (not using Firebase Auth).

For android, FCM token generated is of length 152 and when I send a notification using Firebase Admin SDK, I receive the notification.

But for iOS, FCM token generated is of length 163. While using the same Java code to send notification, I get 404 error with "errorCode": "UNREGISTERED" and "message": "Requested entity was not found."

Push Notifications capability is added in Xcode. Notification listeners are also in place to handle notification if app is in foreground, background or closed.

I have tried to uninstall and then install the app. Even when a new FCM token is generated, the result is same. On the other hand, for some iOS devices (same iOS version), FCM token is generated with length 152 and I am able to send notification to those iPhones. I am unable to find out what is causing this issue on some iOS devices.

Expected:Notifications arriving on both android and iOS devices
Actual Result:
Notifications arriving on android.
Notifications arriving on iOS devices with FCM token length 152.
Notifications not arriving on iOS devices with FCM token length 163

Here are my configurations:
General:
iOS: 13.5.1
Model: iPhone XR
react-native: 0.62.2

Package.json:
"react-native-firebase": "^5.6.0",

Podfile:
pod 'Firebase/Core', '5.20.2'
pod 'Firebase/Messaging', '5.20.2'

Android/app build.gradle:
implementation "com.google.firebase:firebase-core:16.0.8"
implementation "com.google.firebase:firebase-messaging:17.6.0"


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>