Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
551 views
in Technique[技术] by (71.8m points)

ios - Apple Callkit Displays empty screen when implementing SendCall

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)
                        }
                        
                    })
        }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...