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.
Hey guys, thanks for your awesome work!
We are experiencing a problem regarding push token creation. As this answer states: [Push Notifications] Old and new Notifications API return different push notification tokens for the same device - #5 by victorwads
When calling Expo.getPushToken(), Expo handles sending local APN to Expo Notification service and generating a new token - if necessary.
In our case, we have two devices. A chat application is developed. On each device, there is a unique user logged in and they are trying to send each other a push notification over a server.
On login, they get their respective push token and send it to the server, which updates it in its database. User A then sends a message to user B, but as both have the same Expo Push token, he might probably end up receiving his own message.
We can see the field “devicePushToken” being different on each device. How can the Expo push token be the same?
Side note: in this case, the device of User B has been created by a backup of the device of User A (Apple backup restore during device setup). On of our other developers has had no problem with this method and push tokens are unique.
Thanks for any comment!