15

I have an iOS app using push notification but once in a while I'm not getting a notification on my device when I expect to receive one. I would receive all the subsequent notifications. I confirmed with my backend to make sure that all the notifications were sent successfully.

So my question is: is APNs nearly 100% reliable or should I just expect to miss some notifications here and there because of intermittent 3G/wifi connection?

I would think that APNs works as a queueing system and retry if it wasn't successful within the first few times.

Andrew Young
  • 1,779
  • 1
  • 13
  • 27

2 Answers2

22

The APN service will queue messages up -- but Apple doesn't guarantee delivery of all messages. Only the last message from an application will be kept in the queue when the user is offline. Additionally, old messages may be deleted.

Local and Push Notification Programming Guide

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.

Steve
  • 31,144
  • 19
  • 99
  • 122
  • Thanks for the timely response, Steve. In my case I don't think I have the issue with old or too many messages at one time. It's probably more like one every 10-20 min. and that's being generous. – Andrew Young Jul 06 '11 at 04:38
  • 3
    Andrew; then, in your case, if the user is offline (no WiFi or 3G) for 20-40 minutes, they may not get 1 or 2 of the messages. – Steve Jul 06 '11 at 04:40
  • xydev, I was going to check with our a few of our users to see if this is consistent with their experience. However I don't think it would be fair to modify the content of my question if this wasn't the case. So, yes, I'm marking it answered. – Andrew Young Jul 06 '11 at 04:57
  • Thanks for the information. Good to know this in advance before users wonder where their notification went! – Mark Erickson Aug 06 '13 at 19:07
1

I have an azure website (and mobile service, service bus, db, active directory etc) that sends push notifications to a xamarin app on a windows phone and an iphone. The first notification is received by both. The second notification is only received by the windows phone, it doesnt make it to the iphone. If I send another notification, it is received by both. So I investigated the behaviour at bit more and found that if I machine gun a series of notifications (hand typed one per 2 seconds) the windows phone received them all but the iphone only receives the first one. But if I wait a while and send a notification it is received by both devices. The next test is to see if the notifications are always received with a 5 minute gap. Sent two messages with a five minutes gap in between, both windows phone and iphone received both notifications.

Gary Davies
  • 920
  • 15
  • 12