我按照下面的教程,以我的應用程序中實現CallKit當一個視圖控制器:如何顯示回答與CallKit
https://www.raywenderlich.com/150015/callkit-tutorial-ios
但我想走得更遠,並顯示自己的ViewController而該通話處於活動狀態。我正在做一個視頻呼叫服務,所以我想有我自己的界面。
這可能嗎?我一直在嘗試從方法provider(CXProvider:CXAnswerCallAction)
啓動ViewController,該方法是用戶應答呼叫時調用的方法,但似乎每次都會崩潰。我試圖用它來實例化(Swift 3):
let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "VideoCallViewController") as! VideoCallViewController
UIApplication.shared.keyWindow?.rootViewController?.present(vc, animated: true, completion: nil)
它在第二行沒有解釋崩潰。它顯示lldb
,我試圖通過輸入bt
來獲得回溯,但它不返回任何內容。