apns push notifications delay

Hi,


Our application uses APNS push notifications to notify our clients about some change on server or if there is any new message for the user. Many of our clients have complaint us that if they keep the app or phone idle for long time(that is, doesn't open our app for long time) and in the meanwhile if push notification is sent to them, they either don't receive them at all or receive them very late. The delay varies from an hour to couple of days sometimes. This is completely unacceptable to our clients. On my server logs, I found that push notification is pushed immediately from our server to APNS server. Now APNS makes the delay in sending the notification to apple devices. Once the device starts receiving the notifications, then subsequent messages are sent immediately. Can someone here please help us or guide us why APNS might be doing so. Does APNS mark any device or application as inactive if it is in idle mode for some time and then it checks at regular interval if app has become active? Is there a way to solve this issue from our end so that the push notification is sent immediately to the apple devices without any delay. The apple devices on which we are facing issues ranges from iPhone-6 to iPhone-X and iOS version from iOS-10.x to iOS-11.x. We have not checked this in older versions though as most of our clients have updated their devices to latest iOS versions.


Thanks,

Rachir

Replies

This sounds very similar to an issue we've observed. We have an App that is relatively infrequently used, and after it's been idle for some time (many days) notifications are not received (or at least not displayed), or appear only after a delay. After opening the App, notifications do appear immediately for a period of time. We've similarly had this happen on devices running iOS 10, 11 and 12 with with various makes and models. All communications with APNS from our server appear to have been successful.


@rachir did you find anything to suggest what the source of the problem was for your application?

Same thing, and in our case, we registered the APNs from APP, and then sign out our APP, when new messages pushed to APN Server from our server, the mobile can have at least 2~3 minutes delay to receive the message, sometimes may loss the message at all.

Very bad user experience when using APNs.

We just developed an app for use in acute care situations (diagnosing a U.S. Veteran havingstroke). Like Messages, it relies on using APNS for sending small burps of data back and forth (from emergency room or intensive care unit) where patient is presenting to a neurologist somewhere else in the world. It is a very structured correspondence back and forth with Symptom, Action, Confirmation all occurring very quickly.


APNS seemed to be a perfect way to avoid secondary XMPP server message delays as well as large extra moving parts In the system.


But as we come to the first beta of the software, I am noticing problems with Apple Messages on my devices exhibiting the same symptoms described here on all my devices (development MBP, 2 iPads, 1 iPhone) The concern is that once in release, the symptoms could materialize for our stroke app. In our case delay in providing care means more brain damage. Neurons die at a rate of 1.9 million per minute during a stroke. (Time == Brain) Bear in mind that our app and process shaves 10 minutes off the traditional stroke care scenario, but for us there is no option to increase delays.


We will likely go beta in the next couple of days. If anyone here @sarachenie, @captainkirkwood, @rachir, sees anything different or figures out under what conditions this does or does not happen, posting here for us is much appreciated. I will do the same.


TIA!

We have the same problem too, but still have no solutions until now (its been years).


We've already fired a bug report to Apple months ago but without any results. Here's some advises that Apple gave us from the bug report, we've tried without any lucky.


It is very gratefulI if anyone solved the issue and sharing the solutions here, we appreciate your kindness.



Apple's response shown below:


------------------------------------

Would using VoIP with PushKit meet your needs?


Reference links:


https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html


https://developer.apple.com/documentation/pushkit



-------------------------------------

Using “High priority” messages will wake up the device. Can you please collect and attach a sysdiagnose when you see the delay? It will help to see what kind of messages you are sending.


iOS sysdiagnose Instructions:

https://developer.apple.com/services-account/download?path=/iOS/iOS_Logs/sysdiagnose_Logging_Instructions.pdf


For a complete list of logging instructions visit:

https://developer.apple.com/bug-reporting/profiles-and-logs/