My app plays background audio using AVAudioPlayer and receives remote control events from iOS. Everything works fine while audio is playing, but if audio is paused and my app is moved into the background, something odd happens. If I use a bluetooth device to resume/unpause the audio after 10 minutes, iOS terminates my app with the following message:
<MyApp>[633] has active assertions beyond permitted time:
{(
<SBProcessAssertion: 0x25f520> identifier: com.apple.mediaremote.sendremotecommand process: <MyApp>[633] permittedBackgroundDuration: 600.000000 reason: finishTask owner pid:58
)}
There are two very odd things about this.
iOS will not shutdown my app right at the 10 minute mark. It will only do it after receiving remote control command via bluetooth.
If I use iOS's remote control buttons or the remote control on my headphones, my app will resume playing audio with no trouble.
I cannot figure out why a bluetooth remote control message would cause iOS terminate my app. I've been able to confirm that the Pandora app does not appear to have a similar problem.
Does anyone have a clue about this?