Skip to content

Instantly share code, notes, and snippets.

@larryluoo
Created July 8, 2022 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryluoo/e3506d7ea1299b2042a484ad3b938420 to your computer and use it in GitHub Desktop.
Save larryluoo/e3506d7ea1299b2042a484ad3b938420 to your computer and use it in GitHub Desktop.
end
func end(call: Call) {
// 1.
let endCallAction = CXEndCallAction(call: call.uuid)
// 2.
let transaction = CXTransaction(action: endCallAction)
requestTransaction(transaction)
}
// 3.
private func requestTransaction(_ transaction: CXTransaction) {
callController.request(transaction) { error in
if let error = error {
print("Error requesting transaction: \(error)")
} else {
print("Requested transaction successfully")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment