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.
Asked
Active
Viewed 49 times
0
-
Possible duplicate of [Scheduled NSTimer when app is in background?](http://stackoverflow.com/questions/8415870/scheduled-nstimer-when-app-is-in-background) – Bradley Thomas Apr 22 '16 at 14:03
-
Are you trying to update the UI from the background when the timer fires? – Gruntcakes Apr 22 '16 at 14:56
-
No sir, we download the news in background by background fetch. – Saurabh Jain Apr 25 '16 at 04:01
2 Answers
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'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