我在我的应用程序中使用CallKit来接收来电。该应用程序没有呼出功能。一切都很好,但是当接收方或拨打方结束通话时,它会显示CallKit UI并显示回拨选项。我不想显示回拨选项,我该怎么做?
我结束通话的代码:
func end(call: SpeakerboxCall) {
let endCallAction = CXEndCallAction(call: call.uuid)
let transaction = CXTransaction()
transaction.addAction(endCallAction)
requestTransaction(transaction, action: "endCall")
}
private func requestTransaction(_ transaction: CXTransaction, action:
String = "") {
callController.request(transaction) { error in
if let error = error {
print("Error requesting transaction: \(error)")
} else {
print("Requested transaction \(action) successfully")
}
}
}