When I start my app on iphone at that time my AVAudioPlayer
gets closed. and I want that when I start my app in background AVAudioplayer
should be on and when I close my app AVAudioPlayer
started automatically. Why does this happen. can anyone tell me?
Asked
Active
Viewed 96 times
0
1 Answers
0
use following to activate sharedInstance of AudioPlayer while app is in background
[[AVAudioSession sharedInstance] setActive: YES error: nil];
Also for more code refer Play one instance of AVAudioPlayer in the background