Posts

Post not yet marked as solved
3 Replies
1.8k Views
Hi guys,I'm experiencing a problem with the apns-expiration header when on Airplane mode.I'm using VoIP notifications to make audio/video call, and each notification has a lifespan of 15 seconds by setting apns-expiration header.This works for most of the cases but I found a case when doesn't work.This case can be reproduced by following next steps:- Mobile data ON with internet connectivity.- Airplane mode ON.- Receiving a VoIP notification with lifespan 15 seconds (when airplane mode ON).- Afer 15 seconds or more, Airpane mode OFF- I get the late (expired) VoIP notification.My guess it's that when we have mobile data ON and we turn airplane mode ON, the internet connectivity it's cut only for the user but Apple keeps it's persistent connection to the APNS server and even on Airplane mode notifications are delivered to the device instantly (if mobile data can reach Internet).And this is a little tricky and I don't know how to handle. I can get a late VoIP ghost call after 1 hour in this particular case. Before iOS 13 this could be handled by not presenting the incoming call to the user, but with iOS 13 we can't do this because “If app repeatedly fails to report an incoming call then Apple will stop delivering VoIP push notifications to the app altogether”.Apns-expiration header works great when I use only wireless connection, or explicitly I turn OFF the Mobile data instead of using Airplane mode.Do you have any insight regarding this problem?Thanks! Have a nice day!
Posted Last updated
.