I use AudioUnit for audio processing and playback.
And I add audio to the UIBackgroundModes key in info.plist to save it when recording or playing back when entering the background.
The problem is this: when my application does not record or play audio, the application is still running in the background, and I see a red warning bar when the device is locked or on the main screen.
So, how can I turn on my application to pause when it is not recording to save life in battle? Like before adding the UIBackgroundModes key?
source share