문제

I am making an App where i m running am streaming a radio url. But when the App goes into background it stops running. I want to run it when when the App enter background. Can anyone help me with this.

도움이 되었습니까?

해결책 2

It's simple. You need to register as a background audio app by including the UIBackgroundModes key (with the value audio) in its Info.plist file.

Note: Apps that include this key must play audible content to the user while in the background.

Edit

For Xcode 4.6, go to plist-> Required Background Modes-> App Plays Audio

다른 팁

As suggested by P.J., your app should register for background audio play.

According to the Apple Doc

  • When the UIBackgroundModes key contains the audio value, the system’s media frameworks automatically prevent the corresponding app from being suspended when it moves to the background. As long as it is playing audio or video content, the app continues to run in the background. However, if the app stops playing the audio or video, the system suspends it.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top