0

Is background mode for receiving location updates available when app was closed? Is it any way to collect and share location data like Friends app? It shares location always, also when does not runs.

János
  • 32,867
  • 38
  • 193
  • 353

1 Answers1

1

If your app must keep monitoring location even while it’s in the background, use the standard location service and specify the location value of the UIBackgroundModes key to continue running in the background and receiving location updates. (In this situation, you should also make sure the location manager’s pausesLocationUpdatesAutomatically property is set to YES to help conserve power.)

If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because these updates run continuously, around the clock, until you stop them, and can actually result in higher energy use if not employed effectively.

Check out the Location and Maps Programming Guide for more information.

elfanek
  • 142
  • 1
  • 14
  • Is app in background if it is terminated? – János Sep 24 '17 at 16:21
  • When the app is terminated and when it's in the background are two different states, but location can be tracked in both. Check out **Tracking the User’s Location** for more information on this https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW25 – elfanek Sep 24 '17 at 16:48