I’m using background audio in my iOS app. When the app launches there is no audio playing, but the status bar shows the play icon & the pause button is shown on the remote control. The app seems to think I’m already playing audio.
viewDidLoad
[[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];
viewWillAppear
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
Any ideas why iOS thinks I’m playing audio? How can I fix this?
I’m receiving the remote events with no problem.
I figured it out… I’m using the Finch iOS audio library & part of its initialization convinces iOS that audio is playing.
I would like to use Finch & would like to preload my sound effect so it’s ready to go. Unfortunately this doesn’t appear to be possible without the play icon showing up.