4

My push notification service in sandbox development phase works well when the device is online. It keeps getting push messages.

However if a message is sent from te provider (server) when the device is offline (no 3g or wifi), the device is not receiving the push message when it gets online.

Any thoughts on this?

Sukitha Udugamasooriya
  • 2,268
  • 1
  • 35
  • 56
  • Thats coz, push notifications are sent to ios devices via internet connection, so no internet means no push notifications. – Robin Jul 27 '11 at 10:01
  • 2
    Have you checked the Quality of Service component? That should solve your problem. Take a look at [this question](http://stackoverflow.com/questions/6591550/is-apples-push-notification-service-reliable) – g_fred Jul 27 '11 at 10:51
  • @robin I was asking that device doesn't get any messages once it becomes online again. – Sukitha Udugamasooriya Jul 28 '11 at 03:36
  • 2
    It also depends on when the notification was schedule for and what is the expiration date of the notification. If the date of notification is over the notification wont be fired unless it has repeat parameter. And also if the expiration date is hit the notification will be deleted from the server. – Robin Jul 28 '11 at 04:42
  • @ robin, Thanks. please let me know how can I set the expiration date and a repeat parameter to the notification? – Sukitha Udugamasooriya Jul 28 '11 at 10:54
  • Any updates on this as I am also not getting even last push notification when device get back online – Pankaj Battise Aug 24 '20 at 04:48

1 Answers1

4

UPDATE New rephrased documentation is here

Thanks AL

After going through Apple's Quality of Service https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

It retains only one notification per application on a device:

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.

Community
  • 1
  • 1
Sukitha Udugamasooriya
  • 2,268
  • 1
  • 35
  • 56
  • FYI you can activate/deactivate a similar *feature* in Android using ```collapse_key```. – user276648 Jul 20 '15 at 01:37
  • 1
    Hi Sukitha. I've checked the link you provided and it seemed that it's no longer valid. I've found the new one [here](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1). They also seemed to have rephrased the details. Would you mind editing out your answer so it'd be more applicable to the most recent description? Cheers! (and +1!) :) – AL. May 05 '17 at 03:04
  • Anybody knows...the QoS stores the notification for limited period means how many days? – Sangram Shivankar Jun 08 '19 at 09:59