Reputation: 334
Does APNS Feedback Service accounts all the reasons that could cause notifications delivery failure. There can be multiple reasons for failure like
a. The user has uninstalled the application.
b. The device is switched off for a longer duration.
c. The device does not have internet connection.
The apple doc on "Feedback Service" says that
"If a provider attempts to deliver a push notification to an application, but the application no longer exists on the device, the device reports that fact to Apple Push Notification Service. This situation often happens when the user has uninstalled the application"
This seems to suggest that APNS only invalidate the devices which have uninstalled the application. Can anyone please clarify if my assumption is correct?
How many times does APNS attempt to deliver the notification before it blacklist the device in the feedback service?
Upvotes: 3
Views: 1568
Reputation: 11476
As you have correctly stated, the Feedback service will only return device tokens that have uninstalled the app.
Regarding situations b and c:
b) and c), taken from the Quality of Service section in the official Push Notification guide it states the following:
Apple Push Notification Service includes a default Quality of Service (QoS) component that performs a store-and-forward function.
If APNs attempts to deliver a notification but the device is offline, the QoS stores the notification.
It retains only one notification per application on a device: the last notification received from a provider for that application.
When the offline device later reconnects, the QoS forwards the stored notification to the device. The QoS retains a notification for a limited period before deleting it.
I believe this answers those queries; in relation to "how many attempts before being blacklisted" - I sincerely doubt you will find any specific numbers for this. (else people would use them as workarounds)
After completing the delivery of a message, I would highly recommend connecting to the feedback service, seeing if any tokens were rejected and then immediately removing these from your database. Hope this helps!
Upvotes: 2