I pulled this from my git history:
{ // Set audio category to ambient - allows music to coexist with the application
NSError *error;
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory: AVAudioSessionCategoryAmbient error: &error];
if (error) {
NSLog(@"setCategory failed %@",error);
}
}
Hope it helps.