开发者

Allow timers to fire when applicationDidEnterBackground

I have read Apple's documentation and as many posts as I could here on the topic of how an app can run once it has been backgrounded. It seems that there are ways to get an application to complete some remaining tasks but not continue to run indefinitely in the background.

My app has timers set to go off so audio clips can be played to the user. What happens is once the app is backgrounded the clips are not played. I know this can be done somehow as I have run a coup开发者_StackOverflowle apps like what I am trying to do that are handling it. One example being: Nike+ GPS Are these apps just never calling endBackgroundTask?


There are some scenarios where your App can run in the Background.

Check: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html

  • audio. The application plays audible content to the user while in the background. (This includes streaming audio or video content using AirPlay.)
  • location. The application keeps users informed of their location, even while running in the background.
  • voip. The application provides the ability for the user to make phone calls using an Internet connection.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜