AVAudioSession activation failed after emergency alert

Hi,

I'm developing a VoIP application using CallKit.


The AVAudioSession activated by my application has been muted after emergency alert.


This issue happens on Google Duo / Facebook Messenger / Zoom also.

This issue is 100% reproducible running on iOS 13.3 ~ 13.5.1.


2 kinds of audio interruption "AVAudioSessionInterruptionTypeBegan" and "AVAudioSessionInterruptionTypeEnded" events placed at exact time.

And my application tries to activate audio session after "AVAudioSessionInterruptionTypeEnded" event, but it fails every time.


**** Error Logs ****

Error Domain=NSOSStatusErrorDomain Code=1701737535 "(null)" --> AVAudioSessionErrorCodeMissingEntitlement


Please let me know if you can give me some tip or hint to overcome this issue.


Best Regards.

Replies

Hello, I had the same problem, I tried to add flags during the interruption and try to do an audio reset (re-creation of the AudioUnit instance) it worked but the problem I had this code error without the system sending me these interrupts

I believe this is a bug by Apple engineers, but they never pay for their mistakes