voip app ios8:pushkit还是最佳实践吗? [英] voip app ios8: is pushkit still best practice?

查看:263
本文介绍了voip app ios8:pushkit还是最佳实践吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款需要ios9下可靠推送消息(如任何voip)的应用。
这里说,使用IOS8 +应该使用apns(registerForRemoteNotifications):

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

在Optimize VOIP Apps文档中,Pushkit是首选:

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?

推荐答案

来自 VoIP推送通知文档



  • 只有在VoIP推送发生时才会唤醒设备,从而节省能源。

  • 与用户必须在
    之前响应的标准推送通知不同,您的应用可以执行操作,VoIP会直接推送到您的应用
    进行处理。

  • VoIP推送被视为高优先级通知
    ,并且无延迟交付。

  • VoIP推送可以包含比标准推送通知提供的更多数据

  • 如果VoIP推送收到
    时,你的应用是
    ,如果它没有运行则会自动重启。

  • 即使您的
    应用程序在后台运行,您的应用也会获得运行时来处理推送。

  • 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.

在我看来,VoIP推送通知的最大优势在于,如果强行关闭,应用会重新启动。

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

通常,如果您不想使用VoIP功能的推送通知,例如要通知有来电,请使用PushKit。它是为此目的而开发的。对于所有其他情况,请使用常规推送通知。如果您将PushKit用于没有VoIP功能的应用程序,您的应用程序将不会通过审核。

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.

这篇关于voip app ios8:pushkit还是最佳实践吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆