我用这行代码编译错误:
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 中无法构建。有什么答案吗?谢谢!