Sometimes the CallKit UI is not visible. This happens all the time when the user clicks on the "Remind me" button on CallKit UI and cancel the call. Now, when the user gets the call for the second time, there is only vibration but no UI for CallKit.
let callHandle = CXHandle(type: .generic, value: callerName ?? "Unknown".localized)
let callUpdate = getCallUpdate(callHandle: callHandle)
print("reportNewIncomingCall uuid = \(uuid)")
callKitProvider.reportNewIncomingCall(with: uuid, update: callUpdate) { error in
if let error = error {
NSLog("Failed to report incoming call successfully: \(error.localizedDescription).")
} else {
NSLog("Incoming call successfully reported.")
}
completion?(error as NSError?)
}