Search code examples
iosobjective-cvoipaudio-recording

AVAudioSession - recording audio in the background gets interrupted by VoIP


I am trying to record audio in the background in my iOS application. I managed to do it, I set the background mode to "Audio, AirPlay and Picture in Picture" and the audio session to AVAudioSessionCategoryPlayAndRecord, it does record in the background, however, when I start Skype or any other VoIP application and start a call, my application is interrupted completely and stops recording.

Any idea how I can force my application to record in the background while the other app is handling VoIP?


Solution

  • This won't be possible. Only one app can hold the audio recording interface at a time.

    VoIP apps while on call will hold both the playback and recording interfaces. You will have to wait for the interface to be released to resume recording.