开发者

AVAudioPlayer closed while starting the app

开发者 https://www.devze.com 2023-04-06 15:27 出处:网络
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 star开发者_G

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 star开发者_Go百科ted automatically. Why does this happen. can anyone tell me?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消