This is not a give-me-code question, this is a feasibility question. If I initiate a phone call using CallKit, is it also possible to programmatically end it?
Close All Call (Swift4)
func endCall(call: UUID) {
let endCallAction = CXEndCallAction(call: call)
let transaction = CXTransaction(action: endCallAction)
cxCallController.request(transaction) { error in
if let error = error {
print("EndCallAction transaction request failed: \(error.localizedDescription).")
self.cxCallProvider.reportCall(with: call, endedAt: Date(), reason: .remoteEnded)
return
}
print("EndCallAction transaction request successful")
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With