voip app ios8: is pushkit still best practice?
Asked Answered
S

1

5

I am working on an app that needs reliable push messages (like any voip) under ios9. Here it says, that with IOS8+ one should use apns (registerForRemoteNotifications):

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/index.html#//apple_ref/occ/instm/UIApplication/setKeepAliveTimeout:handler:

In the Optimize VOIP Apps document, Pushkit is preferred:

https://developer.apple.com/library/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html#//apple_ref/doc/uid/TP40015243-CH30-SW1

Does anybody have a clue on this? Or do they run the same code in the background?

Stodder answered 24/9, 2015 at 11:46 Comment(0)
P
8

From the documentation for VoIP Push Notifications:

  • The device is woken only when VoIP pushes occur, saving energy.
  • Unlike standard push notifications, which the user must respond to before your app can perform an action, VoIP pushes go straight to your app for processing.
  • VoIP pushes are considered high-priority notifications and are delivered without delay.
  • VoIP pushes can include more data than what is provided with standard push notifications.
  • Your app is automatically relaunched if it’s not running when a VoIP push is received.
  • Your app is given runtime to process a push, even if your app is operating in the background.

The biggest advantage of VoIP Push Notifications over regular ones is in my opinion, that the app gets relaunched if it was force-closed.

In general, if you wan't to use the push notifications for VoIP functionality, e.g. to notify about an incoming call, use PushKit. It was developed for this purpose. For all other cases, use regular push notifications. Your app won't go through the review if you use PushKit for an app without VoIP functionality anyways.

Pudendas answered 24/9, 2015 at 12:47 Comment(4)
hi, i have a messaging app with VOiP capability, i'm wondering if i can use VOiP push to notify the user about text message too ? will Apple reject my app if i do so ?Mcgean
According to the review guidelines, "Apps may only use background services for their intended purposes", but I would guess, they wouldn't detect, if your VoIP app also uses PushKit for non-VoIP related push notifications...Pudendas
Hi, do you know how to implement VoIP push at server side? Does voip share same APIs with APNs push?Rosemarie
@Rosemarie there's a good tutorial here which covers the server side code required using 3 different methods. github.com/Hitman666/ios-voip-push In addition to this I have just implemented the server side push code using the "PushSharp" .net nuget package and it works well.Rebellious

© 2022 - 2024 — McMap. All rights reserved.