Created
July 8, 2022 09:42
-
-
Save larryluoo/e3506d7ea1299b2042a484ad3b938420 to your computer and use it in GitHub Desktop.
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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