If you are testing on simulator, then it's doesn't work on simulator, please use device. If you are using device and audio is not playing in background, then can you please email me your complete source code at khalid0491@gmail.com. I have also done in my Application.My code is given below.
- (void)viewDidLoad { [super viewDidLoad]; NSError *setCategoryErr = nil; NSError *activationErr = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &setCategoryErr]; [[AVAudioSession sharedInstance] setActive: YES error: &activationErr];}
and in plist i made an array named "Required background mode" and insert an item in array name, "App Plays Audio".