I just finished my Radio station IOS application but I have 1 problem here .. when you are listening to the streaming and press the home button the application stop working .... I did some research and found some application keep the streaming after pressing the Home Button.
is it an option in the Xcode I can enable it?
You need to set the audio session category correctly:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
check also this question: iPhone OS 4 Multitasking - Playing Audio In background
我解决了这个问题,我只是在Plist中设置了一个条目
Required background modes : App plays audio
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.