1 Reply
      Latest reply on Jul 18, 2019 5:17 PM by ptank
      kertel Level 1 Level 1 (0 points)


        I developed a Voip application using CallKit.

        When my phone is unlocked and I receive incoming calls, the audio works.

        But when my phone is unlocked. No sound at all. And when I click on my application and I get to it. I have the audio stream.

        I have this error at the end but I don't understand the warning/error :

        Unbalanced calls to begin/end appearance transitions for .

        I am on 12.3.1 and I tested on 2 Iphones.


        • Re: No Audio on Incoming Calls and locked devices in CallKit
          ptank Level 1 Level 1 (0 points)



          We have also seen similar problem https://github.com/twilio/twilio-video-ios/issues/8


          As mentioned on the github ticket the work around is -

                      do {
                          try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, mode: AVAudioSessionModeVoiceChat, options: .mixWithOthers)
                          try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker)
                          try AVAudioSession.sharedInstance().setActive(true)
                      } catch {
                          DDLogInfo("Speaker error : \(error)")
                      strongSelf.provider.reportNewIncomingCall(with: strongSelf.uuid, update: strongSelf


          Is there a better solution for this issue?