Cordova iOS CallKit - 来自 phone 通话记录的调用(“最近”选项卡)停止工作

Cordova iOS CallKit - calls from phone call history (Recents tab) stopped working

我正在开发基于 WebRTC 和 Cordova 平台的 VoIP iOS 应用程序。我们大量使用 CallKit API,它将使用我们的应用进行的每次通话添加到 phone 的通话记录中。当点击我们的电话时,iOS 应该 运行 我们的应用程序并将呼叫意图传递给它,并且它曾经工作得很好。我没有注意到它何时停止工作 - 可能是在更新到 iOS 10.

之后

我已经拥有的:

  1. 在 .plist 文件中:

<key>NSUserActivityTypes</key> <array> <string>INStartAudioCallIntent</string> </array>

  1. 呼叫意图扩展。用 Siri 发起通话时,它工作正常,但在点击通话历史记录时 运行 没有。

  2. 在应用程序的委托中实现了 (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler。同样,它在使用 Siri 通话时效果很好。

有人知道我错过了什么吗?

谢谢。

的回答很有帮助。

我需要将 supportedHandleTypes 添加到我的 CXProviderConfiguration。

Swift:

configuration.supportedHandleTypes = [CXHandle.HandleType.generic, CXHandle.HandleType.phoneNumber]

Objective C:

configuration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], nil];