我正在将 PushKit
集成到我的 iOS
应用程序中,并准备好客户端代码。我正在使用 PKPushRegistry
进行注册,并在我的委托(delegate)中接收带有 token 的 PKPushCredential
。我正在将此 token 注册到与 APNS
通信的服务器。
我找不到关于从我的服务器发送什么到 APNS
以向客户端发送 VoIP
推送通知的好文档。我是否只是通过用我的 VoIP .pem
替换我的 Remote Notifications .pem
发送一个带有 content-available:1 的普通远程通知请求来推送?
最佳答案
感谢您提出这个问题。
请阅读下面有关 Apple PushKit
的一些有用信息,或者您也可以阅读 Apple official page .
The PushKit framework provides the classes for your iOS apps to receive pushes from remote servers. Pushes can be of one of two types: standard and VoIP. Standard pushes can deliver notifications just as in previous versions of iOS. VoIP pushes provide additional functionality on top of the standard push that is needed to VoIP apps to perform on-demand processing of the push before displaying a notification to the user.
Apple
PushKit
不是简单的 APNS,而是静默推送 通知,以便您的应用程序在您收到时不会使用react 推送通知。我们需要在您需要时手动安排
UILocalNotification
从服务器接收推送。在
中显示您想要显示给用户的内容UILocalNotification
一些著名的应用程序使用 PushKit
进行通知,例如 WhatsApp、Skype。
仅发送将用于生成本地通知的有用信息。
关于ios - 接收 PushKit VoIP 通知 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39784696/