4
votes

Apple Push Notification Service has a so called Feedback service to invalidate expired tokens.

Does Azure Notification Hub use it? What happens exactly when APNS returns expired token? The registration expires or no new messages are sent to this token? What if a new registration with the same token is created after invalidation?

1

1 Answers

4
votes

From the following quotes, it appears that Azure Notification Hub handles the communication with APNS Feedback service for you.

Device handle management. Notification Hubs maintains the handle registry and feedback from PNSs.

(Source)

Device token management. Notification Hubs relieve your backend from having to store and manage channel URIs and device tokens used by Platform Notification Services (WNS, MPNS, Apple PNS, or Google Cloud Messaging Service). We securely handle the PNS feedback, device token expiry, etc. for you.

(Source)

Apple returns a device token in the Feedback service if it discovers that the application was uninstalled from the device. In order that Apple will discover that, you first have to send a push notification to the device that uninstalled the app. Then, if you retrieve data from the Feedback service, the device token of that device should be returned. You are supposed to stop sending notifications to device tokens returned by the Feedback service.