Please provide the following:
- SDK Version: 40
- Platforms(Android/iOS/web/all): iOS
- Add the appropriate “Tag” based on what Expo library you have a question on.
Hi, I’m using expo-notifications to send notification with firebase messages.
The integration works great with android, not so much with iOS, the token that’s returned seems to be an apn token not an FCM, and firebase admin rejects the token with “The registration token is not a valid FCM registration token”
I tried to use “https://iid.googleapis.com/iid/v1:batchImport” (following this guide: Convert APNS Tokens To FCM Tokens With Simple HTTP APIs) with returns a valid FCM token, and works with Firebase Notification Composer, I can get notifications through that interface, but if I try to do the conversion and send notifications from the generated FCM using firebase i get an error from firebase “SenderId mismatch”.
I have the credentials correctly added into firebase iOS client, as proven by the Firebase Notification Composer, but somehow, expo is returning a token that is not signed with the same SenderId as firebase and the admin does a check the Composer does not? No sure what’s the case.
I would like to get a FCM token from Notifications.getDevicePushTokenAsync(), which should be possible, or was possible (at least there are some discussions in the github issues).