2

I have developed an application in which I'm running a countdown timer. The timer fires a method every second. However, when the phone is in sleep mode, the timer becomes slow or even turns off.And when I press the home button, the timer turns off. If someone understand what exactly we need, please tell me.Thanks!

scofield
  • 31
  • 1
  • 4

1 Answers1

0

You would have to register your app for some background execution. I am too having the same issue, but I guess mine could be solved as I will register for Location background support, and I have noticed in another SO question that NSTimer works when you have registered you app for some background execution. Here it is NSTimer on background IS working

For background execution please read apple documentation http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW4

Community
  • 1
  • 1
Sohail
  • 2,058
  • 7
  • 33
  • 57
  • Hello,Sohail!I read apple documentation for background execution but I still not understander it! How to register mine app for some background execution,for example how to write code ?Can you help me?Thanks. – scofield Jul 04 '11 at 08:12