APNS sandbox token lifetime

I have an app that incorporates push notifications. The app and service is working as expected. I can send a push notification and the sever (api.development.push.apple.com) responds with success, and the notification appears on the device.


My question relates to the lifecycle of the token.

- Install the app and set up for push notifications.

- Send a push notification and receive the notification on the device.

- Remove the app from the device.

If I send a push token AFTER I remove the app from the test device, the APNS server reports a successful send.


Should the APNS server know the app/token has been removed from the device?

How many of these successful yet failed sends occur before the token is reported as bad?


All help appreciated.

Accepted Reply

> Should the APNS server know the app/token has been removed from the device?


Yes. It will notice that the app has been uninstalled eventually, but…


> How many of these successful yet failed sends occur before the token is reported as bad?


…it's not clear when, exactly, that happens. In my experience, it's "pretty soon, but not immediate." I'd say it's usually within a day of uninstalling the app, but don't have a ton of evidence to back that up.

Replies

> Should the APNS server know the app/token has been removed from the device?


Yes. It will notice that the app has been uninstalled eventually, but…


> How many of these successful yet failed sends occur before the token is reported as bad?


…it's not clear when, exactly, that happens. In my experience, it's "pretty soon, but not immediate." I'd say it's usually within a day of uninstalling the app, but don't have a ton of evidence to back that up.