reportNewIncomingCall没有调用完成参数,这意味着我没有收到关于为什么我的 VOIP 应用程序没有显示调用接收警报的任何反馈。
func reportIncomingCall(uuid: UUID, handle: String, hasVideo: Bool = false, completion: ((NSError?) -> Void)?) {
// 1.
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .phoneNumber, value: handle)
update.hasVideo = hasVideo
// 2.
provider.reportNewIncomingCall(with: uuid, update: update) { error in
if error == nil {
// 3.
let call = Call(uuid: uuid, handle: handle)
self.callManager.add(call: call)
}
// 4.
completion?(error as? NSError)
}
}
我是从 Ray Wanderlich tutorial 中获取的.
我尽可能准确地复制了代码。它在教程中有效,但在我的项目中无效。
最佳答案
关于swift - 未调用 reportNewIncomingCall 完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55737315/