My application supports the GPS and it runs both in foreground and background. I have started a timer , which is working perfectly unless the device is locked.
I want the timer to keep on running even when the device is locked.
Can anyone tell me how this can be done ?
Whichever way you start a timer, the default run mode is like below:
using
NSDefaultRunLoopMode. You want more flexibility, so change forMode to takeNSRunLoopCommonModesinstead and you should be fine.