iOS 8 VoIP Notifications

In iOS 8, Apple introduced a new type of push notification that could be used by VoIP apps in order to wake them up when receiving a call. With this new type of notification developers don’t need to set keep alive handler in order to keep the app alive. The new notification type will wake up the app in the background when needed instead of keeping the app running in the background. Overall this should help reduce data usage and improve battery life for users.

This all sounds good but after looking through the documentation there is no reference to how to implement this. The documentation states:

In iOS 8 and later, voice-over-IP (VoIP) apps register for UIRemoteNotificationTypeVoIP remote notifications instead of using this method.

The problem is that UIRemoteNotificationTypeVoIP does not exists. It does not exist because Apple has introduced a new push notification framework specifically for this type of notification which is called PushKit. So let’s get into it and implement VoIP notifications into an application

在iOS8,苹果引入了一个新的被用于VoIP APP类型的推送消息,这可以使用户收到一个来电时唤醒APP。有了这种新的推送,开发者们不需要让APP持续保持后台运行。当需要保持这个APP在后台运行时,这个新的消息类型将会在后台唤醒APP。总的来说,这会帮助减少数据使用改善电池的使用寿命。

这听起来很实用,但是文档并没有介绍如何实现这个功能。文档这样描述的:
In iOS 8 and later, voice-over-IP (VoIP) apps register for UIRemoteNotificationTypeVoIP remote notifications instead of using this method.(在iOS8和之后的版本,VoIP APP注册VoIP类型的远程推送来使用这个方法。)

问题在于VoIP类型的远程推送不存在。因为苹果介绍了一种专门用于这种类型的推送称之为PushKit的新的推送框架。现在让我们来在一个应用中实现VoIP推送。

你可能感兴趣的:(iOS 8 VoIP Notifications)