Ios8 VoIP application: is patter even better practice?

I am working on an application that needs reliable push messages (like any voip) under ios9. It says here that with IOS8 + apns (registerForRemoteNotifications) should be used:

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

In the Optimize VOIP Documents 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 anyone have a clue to this? Or do they run the same code in the background?

+5
source share
1 answer

From the document for VoIP Push notifications :

  • The device wakes up only when pushing VoIP occurs, saving energy.
  • Unlike standard push notifications, which the user must reply to earlier, your application can perform an action, a VoIP press goes directly to your application for processing.
  • VoIP outputs are considered high priority notifications and delivered without delay.
  • VoIP outputs may include more data than what is provided by standard push notifications.
  • Your application will automatically restart if it does not work when a VoIP click is received.
  • Your application is provided with runtime to handle push, even if your application is running in the background.

The biggest advantage of VoIP Push Notifications over conventional ones is, in my opinion, that the application restarts if it was forcibly closed.

In general, if you do not use push notifications for VoIP functions, for example. To notify you of an incoming call, use PushKit. It was designed for this purpose. For all other cases, use regular push notifications. Your application will not pass the test if you use PushKit for an application without VoIP functions in any case.

+8
source

Source: https://habr.com/ru/post/1013550/


All Articles