简体   繁体   中英

Token-Based Connection to APNs Error 400 BadDeviceToken | Apple Push Notification errors

we are planning to move to the new Token-Based Connection to APNs to send notifications. Apple Document.

This supports sending notifications to multi apps under the same team id and irrespective of environment stage/prod.

But weirdly when try to send notif to device token of production app it's working. whereas when I tried to send notif to stage app device token it failed with error 400 BadDeviceToken.

From the documentation, it mentions the following:

For security, APNs requires you to refresh your token regularly. Refresh your token no more than once every 20 minutes and no less than once every 60 minutes. APNs rejects any request whose token contains a timestamp that is more than one hour old. Similarly, APNs reports an error if you recreate your tokens more than once every 20 minutes.

Are you refreshing your development token regularly? If yes, then try deleting the app from the device and reinstalling it from Xcode as mentioned in this LINK .

Hope this helps fix your issue.

Regards,

AJ

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM