Reputation: 14091
The reportNewIncomingCall completion argument isn't being called, which means that I'm not getting any feedback as to why my VOIP app isn't displaying the call receiving alert.
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)
}
}
I am taking this from a Ray Wanderlich tutorial.
I copied the code as exactly as possible. It works in the tutorial but not in my project.
Upvotes: 3
Views: 1758