We are setting up push notifications for an Expo React Native app. On the client side, we’re using expo-notifications and calling getDevicePushTokenAsync() to retrieve the native FCM and APNs tokens. This method successfully returns tokens for both Android (FCM) and iOS (APNs).
However, when we try to use the APNs token returned on iOS with the Firebase Admin SDK in our Feathers.js application, we encounter the following error:
“Error: The registration token is not a valid FCM registration token.”
From my understanding, the Firebase Admin SDK is supposed to automatically convert the APNs token into a valid FCM token before sending push notifications, but this doesn’t seem to be happening.
Has anyone experienced this issue before, or know how to resolve it? Any insights or assistance would be greatly appreciated!
-
We successfully sent a notification via the Firebase Console (console.firebase.google.com), and it was received (We did not need to specify a token here).
-
However, when we tried sending a test notification using the APNs token through the Firebase Console, the notification was not received on iOS.
-
We also attempted to send a notification using the APNs token via the Firebase Admin SDK within our Feathers.js app, but the notification did not arrive on iOS.
-
Notifications work perfectly on Android devices using the token provided by getDevicePushTokenAsync(). The issue only occurs with iOS devices.