对Swift 3中成员'提供者'(CXProvider)的模糊引用? (CallKit)

时间:2016-12-12 09:31:28

标签: swift callkit

我用这行代码编译错误:

self?.provider .reportOutgoingCall(with: callUUID, connectedAt: nil)

说:对成员'提供者'的模棱两可的提及

这是完整的功能:

        let callUUID = NSUUID (uuidString: callUUIDString!)
        let startCallAction = CXStartCallAction.init(call: callUUID as! UUID, handle: CallProvider.handleFromCall(_call: _call))
        startCallAction.isVideo = false

        callController .request(CXTransaction.init(action: startCallAction)) { [weak self] error in
            if error == nil {
                provider .reportOutgoingCall(with: callUUID, connectedAt: nil)
                startCallAction .fulfill()
            } else {
                startCallAction.fail()
            }
        }

在Objective-C中,这可行,但在swift 3中无法构建。任何答案? THX!

0 个答案:

没有答案