How much delay of ios push notification?
Asked Answered
Z

1

27

I want to add a fire alarm function to my app. I think the push notification may be the best choice. But if there is much delay, like over 10 mins, it would be meaningless for fire alarm. So how much delay for push notification, assuming the device is online?

Zulemazullo answered 9/2, 2012 at 2:52 Comment(0)
S
47

Push notifications are unreliable and cannot be guaranteed that they have been delivered. It all depends on the apple APNS server, that said, usually when I send a push notification I get the result in under a few seconds.

More Information:

They are not reliable! There is no guarantee that push notifications will actually be delivered, even if the APNS server accepted them.

As far as your server is concerned, push notifications are fire-and-forget; there is no way to find out what the status of a notification is after you’ve sent it to APNS. The delivery time may also vary, from seconds up to half an hour.

Also, the user’s iPhone may not be able to receive push notifications all the time. They could be on a WiFi network that does not allow connections to be made to APNS because the required ports are blocked. Or the phone could be turned off.

APNS will try to deliver the last notification it received for that device when it comes back online, but it will only try for a limited time. Once it times out, the push notification will be lost forever!

Source: http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12

Scholasticism answered 9/2, 2012 at 2:54 Comment(4)
Thanks! Is there any other reliable solution for fire alarm?Zulemazullo
Using a third party tool like urbanairship gives feedback whether or not a notification was received and shows any errors. Also, please "accept" my answer if it helped you. :)Scholasticism
Urbanairship does not give feedback whether the notification was received. Rather, it gives feedback if the token is invalid, which can be retrieved using apple's feedback service as well. Urbanairship is slightly less reliable than using Apple directly in my experience.Whispering
I'm using VOIP Push notifications, which are made for calls. See developer.apple.com/library/content/documentation/Performance/…Territerrible

© 2022 - 2024 — McMap. All rights reserved.