2

I can track the geolocation when app is in foreground and in background (with all the discussions about precision of location and saving battery life).

However I would also need to track the user when the app is not running (not open and not in background, killed), of course with the user permission.

Is it possible to do it?

I need something like "Find Friends" app. Is it allowed?

Thanks

Andrea.Ferrando
  • 987
  • 13
  • 23

1 Answers1

5

You can track location even when the app is killed.

startMonitoringSignificantLocationChanges

for monitoring the location. For demo refer this link below

http://mobileoop.com/getting-location-updates-for-ios-7-and-8-when-the-app-is-killedterminatedsuspended

Raghav7890
  • 458
  • 3
  • 13
  • wow thanks!!! That works! My only problem is that with 'startMonitoringSignificantLocationChanges', it updates the location every few seconds, is there a way to update the location every minute if the app is killed? Plus... is this going to affect a lot the battery? Reading the document you attach, at the paragraph: "How Frequent is the Location Updates?" it says it should update just if you move 500m, but I constantly get updates – Andrea.Ferrando Jan 05 '17 at 10:57
  • are you testing in a simulator?? – Raghav7890 Jan 05 '17 at 11:20
  • No, now it doesn't do anymore, when I go out I will check if I get the update of the location. Thank you very much!! – Andrea.Ferrando Jan 05 '17 at 11:48
  • awesome :), if you have got what you need, mark this as completed! – Raghav7890 Jan 06 '17 at 06:13