我用这行代码编译错误:
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!