Does InterruptEnded with the shouldResume option in the interrupt handling of AVAuidoSession ensure session activation in my app?

I am currently testing a simple audio session for audio recording



Record -> play other Music app -> my app interrupt began -> terminate other Music app -> my app interrupt ended.


I am testing this process. At the end of the interrupt, if I include shouldResume, I try to activate the session and start recording again,

but there is a case where the session can not be activated.


My question is, if I include shouldResume in AVAudioSessionInterruptionOptions in the Interrupt ended state of my app, I wonder if my app can activate AVAuidoSession like the ShoudlResume name.

If I do not have a shouldResume in InterruptEnded, I think my app's session might not be active, but even if I have a shouldResume, the session is sometimes active or not.



https://developer.apple.com/library/archive/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/HandlingAudioInterruptions/HandlingAudioInterruptions.html#//apple_ref/doc/uid/TP40007875-CH4-SW5


I also read and studied about the above article.


I tested Apple's basic voice memo and other apps on the App Store to see how they would handle it. Two things came to my mind.


In one case, when the interrupt is started, the user stops recording, and after the interrupt, the user presses the button again to resume recording.


The other is to use it with the MixWithOthers category, so that it runs simultaneously with other apps that write audio sessions.


So, regardless of shouldResume, it seems to handle the start and end of an interrupt, so I wonder about the shouldResume option.


Thank you for reading my long question.