Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Iphone receive all push notification after net connection is back

I am developing an application with push notification.

When the receiver is not connected to WIFI/internet while the sender is sending messages, does the receiver receive all of the sent messages when the receiver reconnects to the internet?

like image 673
Xcode Avatar asked Dec 27 '22 01:12

Xcode


1 Answers

There is a queue that will be sent to the user once he/she gets an internet access. However if the user is without internet for a "long time" there is no guarantee that the notification will be sent/recveived.

The Apple documentation is very vague on what amount of time that is considered long time. (See documentation)

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 notification is stored for a limited period of time, and delivered to the device when it becomes available.

Only one recent notification for a particular application is stored. If multiple notifications are sent while the device is offline, each new notification causes the prior notification to be discarded. This behavior of keeping only the newest notification is referred to as coalescing notifications.

If the device remains offline for a long time, any notifications that were being stored for it are discarded.

However I've heard that the APNS will try to resend the notification for approximately 25-30 days. However there is no official documentation supporting this!

like image 64
Groot Avatar answered Apr 22 '23 11:04

Groot