I am implementing Callkit in my app with Quickblox. But the problem is when I open the screen via Callkit, It just shows an empty screen. Nothing appears although the delegate func providerDidBegin(_ provider: CXProvider)
gets triggered and call runs fine in the background.
Any help will be appreciated.
DispatchQueue.main.async {
let configuration = CXProviderConfiguration(localizedName: "Homing Pigeon")
// 2
// Native call log shows video icon if it was video call.
configuration.supportsVideo = true
// Support generic type to handle *User ID*
// configuration.supportedHandleTypes = [.generic]
configuration.supportedHandleTypes = [.phoneNumber]
// Icon image forwarding to app in CallKit View
if let iconImage = UIImage(named: "App Icon") {
configuration.iconTemplateImageData = iconImage.pngData()
}
self.provider = CXProvider(configuration: configuration)
self.provider!.setDelegate(self, queue: nil)
let controller = CXCallController()
let transaction = CXTransaction(action: CXStartCallAction(call: UUID(), handle: CXHandle(type: .generic, value: "Pete Za")))
controller.request(transaction, completion: { error in
DispatchQueue.main.async {
//self.view.isHidden = true
print("I am here")
print(error)
}
})
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…