1

Is it possible to repeat task long time in Background state with one of Background modes like this?

Task A ... wait for 5 seconds ... Task B ... wait for 10 seconds ... Task A ... wait for 5 seconds ... Task B ... wait for 10 seconds ...

In applicationDidEnterBackground I created BackgroundTask and NSTimers (not pass repeat mode by YES, using dispatch_async and NSRunloop) but it seems works only in 3 minutes (Task B is called in Timeout delegate of Timer A created in Task A, and Task A is called in Timeout delegate of Timer B created in Task B). In all methods I created BackgroundTask, sometime backgroundTimeRemaining increases, after that it reduces to 3 sec and Background Task timeout fired.

Quang Tuan
  • 43
  • 4
  • No its not possible. But if you use location services it can be kept going beyond the 3 minutes but that will drain the batteries unless you only need to do this for a limited amount of time before turning off location. – Gruntcakes Jun 01 '15 at 23:01

0 Answers0