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.
As soon as you answer, the CallKit UI is displayed only if the phone is locked. If the phone is unlocked you will be redirected to your app, so is your responsibility to implement an ongoing call UI.
It seems that the in-call screen is in the app carousel of background apps and can be switched to manually
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 usingCallKit
, 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.