iPhone APNS Device Tokens in sandbox vs. production

此生再无相见时 提交于 2019-11-27 17:50:37

When you build your app using a development cert, the app will generate a unique device token. This device token will not work on the production push network. When you then build your app with a distribution provisioning profile (App Store or Ad-Hoc) your device will generate a different device token for push notifications. If you try to send the development generated token to the production push SSL network, Apple's servers will reject your token.

What I did was to try production first, then if that failed with an InvalidToken code, then try it again against sandbox.

In case you're wondering, yes, this is harder than it needs to be.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!