Voip PushKit issue when device suspended for a while

I'm working on a voip app using PushKit, I can receive voip push notifications in all possible app states (e.g. background, foreground, active, inactive). Using PushKit, I have to register the app with the background mode "voip" in the Info.plist - so far, so good. I still implemented the PFPushRegistryDelegate, which receives push credential updates or voip push notifications.

Everything works well and the notification is received very quickly bu I discovered a serious problem (sistematic) with Voip PushKit: when the app is in suspended state and the screen is locked, my app wakes up after several minutes (at least 2 minutes).

Note:


I tested PushKit with the latest iOS version: 10.0.2 on iPhone6S and iPad.

I'm using a sandbox certificate to test it, with a production one the behaviour is different?


Someone has experience on such kind of bugs?


Thanks

Elio

Replies

I did extra tests and I noticed on apsd process on my iPad priority null.

What does it means? How can I check if I've correctly configured the aps message or if my certificate voip is valid?

Below I've attached an explicit log:


apsd(PersistentConnection)[85] <Notice>: 2016-10-28 17:57:15 +0200 apsd[85]: <APSCourier: 0x155ee3a70>: Received message for enabled topic 'it.eggzero.centric.voip' with payload '{

aps = {

alert = {

"action-loc-key" = "<null>";

body = "incoming call";

"loc-args" = (

);

"loc-key" = "<null>";

};

badge = 0;

category = INVITE;

"content-available" = 1;

};

}' onInterface: NonCellular for device token: NO with priority (null)


Note whatsup send such payload:

Oct 28 18:06:43 iPhone apsd(PersistentConnection)[92] <Notice>: 2016-10-28 18:06:43 +0200 apsd[92]: <APSCourier: 0x13fd08a80>: Received message for enabled topic 'net.whatsapp.WhatsApp.voip' with payload '{

c = 1;

i = "174.37.217.76";

id = "1477669942-128";

t = 1477670803;

ts = 1477670803419220;

}' onInterface: NonCellular for device token: NO with priority 10


Any help or suggestion is appreciated.


Thanks

Elio

I did extra tests and I noticed on apsd process on my iPad priority null.

I’m not 100% sure if this is the root cause of your problem but it’s certainly suspicious. This priority is referring to the push notification priority set by your push provider. This is discussed in the Local and Remote Notification Programming Guide. Specifically:

  • If the provider is using the HTTP/2 interface this is set via the

    apns-priority
    header.
  • If it’s using the legacy interface, this is set by Item ID 5.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Have you figured out the problem? We are having the same problem.

It occurs only with a sandbox certificate. let me know if this assumption is true