CallKit report about end

68 Views Asked by At

I need to notify CallKit when a call has ended. I do it through this function

let endCallAction = CXEndCallAction.init(call: uuid_var.uuid_test)
let transaction = CXTransaction.init()
transaction.addAction(endCallAction)
self.controller.request(transaction, completion: {error in print(error)})
self.provider.reportCall(with: uuid_var.uuid_test, endedAt: Date(), reason: .remoteEnded)

But I'm getting this error Optional(Error Domain=com.apple.CallKit.error.requesttransaction Code=4 "(null)")

UUID is correct, end function in a same queue

Report about call looks like this:

self.provider.reportNewIncomingCall(with: uuid_var.uuid_test, update: update){ error in
                completion()
            }

Collecting UUID: uuid_var.uuid_test = UUID()

I've checked, uuid same in all functions

0

There are 0 best solutions below