reportNewIncomingCall完成未调用

问题描述 投票:0回答:1

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 voip callkit
1个回答
0
投票

enter image description here

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

© www.soinside.com 2019 - 2024. All rights reserved.