iOS: Production push notifications, Invalid token from APNS server

后端 未结 6 1112
死守一世寂寞
死守一世寂寞 2020-12-09 10:10

My app is now available in the app store, so I\'ve downloaded it to my device. The push notifications were working fine during development. I am using JavaPNS to send out th

6条回答
  •  遥遥无期
    2020-12-09 10:51

    The device token for production is different than the development one, so if you send a development token to production APNS servers (or vica versa), that's the cause of the problem.

    It's possible you didn't remove the development device token from your server when you switched to production.

    Or if you are getting the development token from your production app, then either the app is returning a locally stored device token (which you may have stored on your device during development) instead of asking Apple to get a new one, or (if you do ask Apple for a current token and still get the development token) your app is not signed with the production provisioning profile.

提交回复
热议问题