PushKit notifications delivery

I am working on PushKit for IM application (like WhatsApp) with VoIP.


I want the push delivery receipt that push has been delivered on the device. Did not find any thing related to it that how it can be added to app. The only way I know is either send an API call or connect with XMPP and then acknowledge.


But on implementing that, it seems like a time taking process, while WhatsApp does it very quickly and more curious how that app works.


Any help in this regard will be greatly appreciated.

Replies

But on implementing that, it seems like a time taking process, while WhatsApp does it very quickly and more curious how that app works.

There’s two ways you can approach this:

  • You can look at what the other app is doing (A)

  • You can measure the time you’re app is taking and optimise from there (B)

I can’t offer you detailed guidance with regards A. In general you can look at an app’s on-the-wire behaviour using one of the tools listed in QA1176 Getting a Packet Trace.

Personally I’d recommend you start with B. The fact you said “it seems like a time taking process” indicates that you haven’t actually tested this, and measuring the problem is always the first place to start with issues like this. For example, if your measurements shows that 90% of the delay is with the push notification making it to your app, there’s not a lot you can do about that.

Finally, on the measurement front, if you use

NSURLSession
for your networking, it has great support for breaking down the time taken by each request. Check out
NSURLSessionTaskMetrics
, discussed in detail in WWDC 2016 Session 711 NSURLSession: New Features and Best Practices.

Share and Enjoy

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

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