Search code examples
iosswiftswift4.2callkit

How do you open the in Call UI after answering a call with callkit


I am trying to integrate callkit with my voip app. At this point the CallKit displays an incoming call but as soon as I press the answer key it just goes back to my app's display homescreen. I want the in call UI of CallKit to display when I press the answer key.

func provider( _ provider: CXProvider, perform action: CXAnswerCallAction) {
    XCPjsua.shared()?.handleIncomingCall();
//    confifureAudioSession()
    action.fulfill()
}

In the XCPjsua.shared()?.handleIncomingCall(); function I just connect the call.


Solution

  • CallKit provides better integration to the system and better VoIP app visibility, but they limit the use of their call screens. You must provide call UI yourself.

    The main purpose of using CallKit in your VoIP app is to improve its usability when app is killed and phone is locked. By using CallKit, system elevates the shared audio session of your VoIP app as the top priority, in order to improve the user experience. CallKit is also responsible to improve your integration to the system services, like handsfree bluetooth integration, car play, Siri, etc.