Search code examples
iosapple-push-notifications

APNS Tokens - Do iOS Sandbox tokens expire?


Just out of curiosity, do sandbox push notifications for iOS expire? The reason I am asking is, yesterday my push notifications were working perfectly for my device and since then I haven't changed the code. Today I wanted to push another notification to further test and all of a sudden, no notification was received. I had to reinstall the app and get another token for it to work.

So, do sandbox tokens expire, or do I possibly have a more serious issue at hand when I go to live?


Solution

  • As of now nowhere it is documented regarding the token expiry. But as an experience and from an architectural point, device tokens will not expire for a smaller duration of time. Because it will create a lot of effort for APNS to generate a new token every time if that is the case. Anyway, you can check your server logs to see the acknowledgement you receive from APNS if it is a failure to deliver a notification.