I have tried setting a 'apns-expiration' to current time + 30 seconds and also a value '0'. But still my voip app receives the voip push notification after 2-3 minutes. Till this time, caller has already hung up the call. But the receivers phone still rings on receiving the push notification as we have to report it to CallKit.
Am I missing something or there is no way and even 'apns-expiration' does not guarantee timely delivery of Voip push notifications or discard if it is expired.
I have set 'apns-priority' to 10 already as recommended.
Due to the nature of networks, it cannot be guaranteed that a target device will not receive a notification past the apns-expiration
time.
The expiration time instructs APNs to not try to send the notification after a certain time. But there will be edge cases where network delays, and especially in cases where the target device some on/off-line frequently, where notifications may end up being delivered past the requested expiration.
If the value is nonzero, APNs stores the notification and tries to deliver it at least once, repeating the attempt as needed until the specified date. If the value is 0, APNs attempts to deliver the notification only once and doesn’t store it.
A single APNs attempt may involve retries over multiple network interfaces and connections of the destination device. Often these retries span over some time period, depending on the network characteristics.
In addition, a push notification may take some time on the network after APNs sends it to the device. APNs uses best efforts to honor the expiry date without any guarantee. If the value is nonzero, the notification may deliver after the specified timestamp. If the value is 0, the notification may deliver with some delay.
Argun Tekant / DTS Engineer / Core Technologies