I develop an application on iphone that uses MPMoviePlayerController to play audio file. When Application goes to background, if mpmovieplayer is playing, iphone continues t
You should read the Technical Q&A QA1668: How to play audio in the background with MPMoviePlayerController.
Summary of the steps needed:
may be you forget to add this in
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
}
I got it working by putting following two lines in Delegate file:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];