Apple push notifications delivery policy

666 Views Asked by At

I am working on an iphone messaging application so using APN Servers to send push notification to offline users (as whatsupp does). I am using Enhanced Notification Format to connect APNs via an API (com.notnoop.apns 1.0.0.Beta7-SNAPSHOT version). https://github.com/notnoop/java-apns
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/LegacyFormat.html

In some cases push notification is not delivered to some devices in a short period of time though everything works fine in my server application, I mean pushnotification byte array is written APNs socket buffer without any problem. At the same time whatsupp can receive push notification properly after that my client application starts receiving notifications from APNS servers. I wonder if something is triggered in APNs after waiting 10 minutes and received whatsup notification.

I know that Delivery of notifications is a “best effort”, not guaranteed but when whatsupp can receive notification why my application sometimes cannot receive. https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW4

Here is my payload and other parameters:

Expiry:86400
Payload:
{"t":"-13","aps":{"content-available":1,"alert":{"loc-args":["Sender Name John"],"loc-key":"LS_NP"},"sound":"pnsound.aiff","badge":3},"n":"M","m":"NP","j":"905551114444"}

Why I am having this trouble some times? and What I need to check?

Does Apple have an reputation policy in which notification delivered to whatsapp is prioritized?

There is one more notification format (other than both simple and Enhanced) https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html This format allows us setting priority format, is this format(IMMEDIATELY) get notification delivered 100%?

0

There are 0 best solutions below