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推送。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值