read
  1. There is location pausing available on the iOS provided location manager, but location pausing is for instances when the user forgets that they have got a location aware app running and have stopped using it. By pausing updates their battery won’t be drained as quickly. But it’s not possible to know whether new movement afterwards is them resuming the activity or doing something else, so updates don’t resume until the app comes back to the foreground. Apple’s suggestion is to catch the pause call and get the user’s attention somehow to get them to open the app if they still want updates. It’s assumed that user intervention is highly undesirable, hence it’s not been considered.

  2. The distance filter does not impact GPS hardware’s activity, i.e., there are no savings of power by setting a larger distance filter because the hardware continues to acquire measurements. This is because the distance filter works on the upper layer in iOS than the GPS driver, thus it won’t reduce the frequency of iOS’s access to the GPS chip. So, it doesn’t matter if the distance filter is 5m or 10m or 100m, using the GPS is going to hog battery at a similar rate.

  3. That said Apple’s doc to mention that using a desired accuracy (different from distance filter) value of kCLLocationAccuracyThreeKilometers (3 kms) is power-friendly, possibly that turns off the hardware that drains the most battery, the GPS, along with killing the WiFi radio. But specifying a value of 3 kms doesn’t prevent the location service from returning better data. Most of the time, iOS’s location service can return location data with an accuracy within a hundred meters or so.

  4. SDK can alternatively fall back to significant location monitoring (power friendly) when app goes into background and toggles back to standard location tracking when app comes into foreground (uses the server provided distance and interval config in foreground, iOS determines the callbacks in the background)

  5. Another difference between using an accuracy value of 3 kms in background vs using significant location monitoring in background should be that in the first case app would continue running in the background, while in the latter, app can get suspended and periodically woken up by iOS when it has a new location value to deliver.

Blog Logo

Abhishek Sengar


Published

Image

Hot Cocoa Software

Blogs written by our developers.

Back to Overview