When use callkit, video button in callkit pannel is abnormal. Here are some case:
iOS117 & incoming call: video button disable
iOS17 & outgoing call: video button disable
iOS16 & incoming call: video button enable
iOS16 & outgoing call: video button disable
will appricate for help!
Core code:
private func configureCallKit() {
let configuration = CXProviderConfiguration(localizedName: "CallkitTesting")
configuration.supportsVideo = true // 是否支持视频通话
configuration.supportedHandleTypes = [.generic]
configuration.maximumCallGroups = 1
configuration.maximumCallsPerCallGroup = 1
provider = CXProvider(configuration: configuration)
provider.setDelegate(self, queue: nil)
}
func startOutgoing() {
let handle = CXHandle(type: .generic, value: "!!!!!!")
let startCallAction = CXStartCallAction(call: UUID(), handle: handle)
let transaction = CXTransaction(action: startCallAction)
CXCallController().request(transaction) { error in
if let error = error {
print("Error requesting transaction: \(error.localizedDescription)")
} else {
print("Transaction requested successfully")
}
}
}