Here's the issue:
I have done the following:
.plist
background mode is audio
.didFinishLaunchingWithOptions
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];
[[AVAudioSession sharedInstance] setActive:YES error:&error];
What am I missing? I checked that error
is nil
after both methods.
I'm quite sure the simulator doesn't support background audio, unfortunately. You'll have to resort to testing on real devices.