首页 > 解决方案 > 未调用 reportNewIncomingCall 完成

问题描述

没有调用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 教程中获取的。

我尽可能准确地复制了代码。它适用于本教程,但不适用于我的项目。

标签: swiftvoipcallkit

解决方案


在此处输入图像描述

这是我没有做的......这解决了它。


推荐阅读