1

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?)
}
Marco
  • 1,572
  • 1
  • 10
  • 21

1 Answers1

0

I am also faced this issue and came to know that I have used same uuid for all calls, after changing it to below it worked for me .so make sure to generate new uuid for each call.

provider.reportNewIncomingCall(with: UUID(), update: update) { error in

    if let error = error{
        print("error while reporting incoming call \(error)")
    }else{
        print("incoming call successfully reported")
    }

  completion?(error)
}
vamsi
  • 1