Keep NSTimer running when app is in background (multitasking)
I hope there's an expert out there who can help me with this:
I googled up and down, but could not find any information if there is any way to keep a running NSTimer active when the app is running in the background (iOS 4)?
I hope there's an expert out there who can help me with this:
I googled up and down, but could not find any information if there is any way to keep a running NSTimer active when the app is running in the background (iOS 4)?
Thanks for any help!
Steve
I am having same problem and I've managed to setup UILocalNotification and it works fine. But, I get event fired once timer gets to zero (i.e., when current clock is equal to setup) instead of getting event, for instance, every second. Here is sample code:
yes i've understand, but if you play a "nosound" during the background you can keepup the timer:d
Ah, OK... now I understand. Worth to have a look at it, but as far as I can tell this might be a problem when you want to get the app authorized by Apple...
Ah, OK... now I understand. Worth to have a look at it, but as far as I can tell this might be a problem when you want to get the app authorized by Apple...
OK, I tried that, but it actually does not do what I was looking for. The silent sound is played properly every x seconds (I checked that by replacing it with an audible sound). But: once the app is set to background mode, the app starts to sleep and all running NSTimers, too. When I re-activate the app, I hear that all 'silent sounds' that should have been played while the app was in background mode, are played right one after the other. Also all other NSTimers continue to tick.
So, this does not help. It does not keep other timers ticking when in background. Too bad...
OK, I tried that, but it actually does not do what I was looking for. The silent sound is played properly every x seconds (I checked that by replacing it with an audible sound). But: once the app is set to background mode, the app starts to sleep and all running NSTimers, too. When I re-activate the app, I hear that all 'silent sounds' that should have been played while the app was in background mode, are played right one after the other. Also all other NSTimers continue to tick.
So, this does not help. It does not keep other timers ticking when in background. Too bad...
I also do not have significant progress ... Sorry.