Reputation: 20486
My iOS APNS certificate expired and we (our iOS developer and I) ended up revoking the old certificate through iTunes Connect and completely starting over after having some issues. Everything is working now and I was able to send test notifications to our devices.
However, we had to regenerate the device token before any notifications came through. I believe this issue was because our devices were previously on a development version of the application (different tokens), and we were attempting to use the production token.
Does anyone know (and can back up with documentation) if device tokens will persist through the revoking/recreation of our APNS certificates? If not, I will have to delete all of the existing tokens and wait for users to re-open the app.
Upvotes: 4
Views: 1655
Reputation: 393791
As you said, you had to regenerate the device tokens only because the same device gets a different device token for the sandbox env and the production env.
Creating a new certificate doesn't change the device tokens (and pre-iOS7, all the apps on the same device had the same device token, so changing the certificate of one app couldn't affect the device token). I've never seen this documented, but this is the behavior I experienced, and it makes sense, since the push certificate is not part of the deployment of the app (it's only used in the server side), and therefore changing it can have no effect on the device token (which is received by the app).
Upvotes: 4