I'm using APNs to push notifications from back end to my iOS app. It works fine in production. But before push new app version, I would test it with the same configuration using APNs, in development environment with the expo app.
- I catch the device push token from my app through Expo, with
getDevicePushTokenAsync. - I have conditions on my API, if it's development environment I send notification to
https://api.sandbox.push.apple.com - I set
experienceIdandscopeKeyprops in the payload notification with@expoUsername/projectSlug.
But when I try to push notification it doesn't work: {"reason":"BadDeviceToken"}
Note that if I make no difference between production and development (send to https://api.push.apple.com and no more props in the payload) I get {"reason":"DeviceTokenNotForTopic"}.