Quantcast
Channel: MPMoviePlayer play on when application goes Background - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Khalid Usman for MPMoviePlayer play on when application goes Background

$
0
0

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".


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>