Possible to Wake up Terminated App to Get a GPS Location Every X Minutes?

I was reading the following two forum posts about getting a user's location every X minutes:


http://stackoverflow.com/questions/10235203/getting-user-location-every-n-minutes-after-app-goes-to-background

http://stackoverflow.com/questions/6347503/how-do-i-get-a-background-location-update-every-n-minutes-in-my-ios-application


But then I realized this only works if the app is in background mode. (And the point of it being so the OS doesn't ever suspend or terminate it for inactivity, to take back some system resources, but correct me if I'm wrong).


But is there a way to wake up a terminated app every X minutes to get a GPS location?


I know you can subscribe to significant location changes, but those are only if the user moves more than 500m... and has no concept of time (every X minutes).

Short answer, no. There is no API on iOS that will wake your app up from terminated every X minutes to do anything, including requesting location.


You can monitor location continuously forever in the background with the appropriate background mode. But if the system terminates your app, it will not be relaunched, and yes it will eat battery. So no, there's no low power reliable way to get a location every X minutes.

using push notifications (silent) you can achieve this

Before the OP invests time and resources to implement push notifications: No, using silent push notifications (Background push notifications with content-available key) is also not suitable for this purpose and is not going to do what you think it does in the long run.


These notifications may be throttled to be delivered only when iOS determines that it’s energy-efficient to do so. Based on a varying number of conditions the system may decide to not relaunch your app until later time, or may not relaunch it at all (for example, if in low power mode). In the field, on users' devices, this is completely out of your control, and cannot guarantee that the push will relaunch your app at the expected time.


To re-iterate what junkpile said: there is no API that will do this. We see a lot of "workarounds" that fail miserably in the end.


And if the app is terminated by the user by swiping it away, all this is going to be moot anyways.

Possible to Wake up Terminated App to Get a GPS Location Every X Minutes?
 
 
Q