在 iOS13 上运行启用 VOIP 的应用程序时出现 NSInternalInconsistencyException

Jit*_*dra 3 voip ios13 xcode11

*** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“使用 VoIP 推送的 PushKit 应用程序必须链接 CallKit 或 IncomingCallNotifications 框架。”

此错误显示在使用 iOS 13 的 xcode 11 Beta 上。 xcode10 上没有问题。

使用 VoIP 推送的 PushKit 应用程序必须链接 CallKit 或 IncomingCallNotifications 框架。#voip

Jit*_*dra 6

在项目的常规设置中嵌入CallKit.framework可以解决此问题。

在 iOS 13 上,Apple 现在要求将所有 VoIP 推送通知作为新呼叫报告给 CallKit 框架

这里提到的重要变化:

https://developer.apple.com/documentation/pushkit/pkpushregistrydelegate/2875784-pushregistry?language=objc

https://forums.developer.apple.com/thread/117939