0

I started a timer when app goes into background when selector method called app got crashed in background. I am not sure does code works in defined conditions.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Saurabh Jain
  • 1,688
  • 14
  • 28

2 Answers2

0

In background mode, when your app is not running, timers will just not fire. A timer will fire at the earliest time it can (for example just after your app is activated again). If a repeating timer should have fired more than once, only the last "fire" will happen.

This shouldn't make your app crash; whatever goes wrong is something else.

gnasher729
  • 51,477
  • 5
  • 75
  • 98
-1

Timers only run in the background if you app supports running in the background, like when tracking location, playing music, etc.

EmilioPelaez
  • 18,758
  • 6
  • 46
  • 50
  • I have enabled background fetch mode. – Saurabh Jain Apr 22 '16 at 13:57
  • I've never used background fetch, but I'm pretty sure it only wakes up your app from the background when there's new content to fetch, unlike background location or music, which keep the application awake. – EmilioPelaez Apr 22 '16 at 14:26