I have integrated CallKit successfully and I'm trying to handle the video button. In some devices, I get the enabled video button and can request to open a video connection. But for some devices, I get a disabled video icon. What could be the reason for that?
private lazy var provider: CXProvider = {
let configuration = CXProviderConfiguration()
configuration.supportsVideo = true
configuration.maximumCallGroups = 2
configuration.maximumCallsPerCallGroup = 4
configuration.includesCallsInRecents = false
configuration.supportedHandleTypes = [.generic]
return CXProvider(configuration: configuration)
}()
func reportIncomingCall() {
let uuid = UUID()
let update = CXCallUpdate()
update.supportsGrouping = true
update.supportsHolding = true
update.remoteHandle = CXHandle(type: .generic, value: "Name")
update.hasVideo = true // or false
provider.reportNewIncomingCall(with: uuid, update: update) { [weak self] error in
// handle
}
}
Note: Whatsapp has the enabled video button in the same device.
-
Did you try removing 'update.hasVideo' assignment from the reportIncomingCall() function altogether since you're always setting it to true.iOS Developer– iOS Developer2024年02月21日 09:59:06 +00:00Commented Feb 21, 2024 at 9:59
-
Hey @iOSDeveloper, Yes I did and there's no difference from that.ajw– ajw2024年02月22日 08:18:15 +00:00Commented Feb 22, 2024 at 8:18
-
Check the video permission for you app in the settings.Chetan A– Chetan A2024年02月26日 01:02:55 +00:00Commented Feb 26, 2024 at 1:02
-
Hey @ChetanA, which permission exactly are you referring to?ajw– ajw2024年02月26日 01:33:44 +00:00Commented Feb 26, 2024 at 1:33
-
As you have highlighted the example of Whatsapp in your question, I would suggest you to check the permission of both the Watsapp and your application on the device. If you disable the Microphone and Camera then you will not be able to make video calls and button would be disabled.Chetan A– Chetan A2024年02月26日 10:15:42 +00:00Commented Feb 26, 2024 at 10:15
lang-swift