Core Location - Significant Location Updates Requires Background Permissions

If you've watched the WWDC video you will already know this but if you just look at the class references it isn't obvious that . iOS 8 introduced the possibility to request permission to access location only while the App is in the foreground which should encourage users to grant permission without fear of being tracked inappropriately however the foreground only mode only works with some of the modes. This slide from the talk (WWDC 2014 What's New In Core Location - Session 706) is the key one:

If you only want approximate location information you can still set the desiredAccuracy and the distanceFilter on the CLLocationManager to large values which should allow a faster fix and use less power than requesting higher accuracies.

When should you Request Background Mode?

In my view you should only request background access to the location if

  • You App really requires it. e.g. run/walk/cycle tracking.
  • Or the use is requesting a specific service or mode that does use it. Alert me when I'm near something.

In the second case I think it is best to only make the permission request when the specific mode or request is made by the user rather than at first launch.

Other Core Location Comments

The reverse geo-coding is quick and effective at least for the UK (probably elsewhere but I didn't try it).


It might be obvious to others but not all locations have a full postcode although all in the UK do have at least the post district (first part before the space). I presume this matches reality.

I hadn't considered the range of formats for the postal district before. It ranges from letter-number (e.g. N1) to letter-letter-number-letter (e.g. EC1A). I suggest you either just allow anything or you build the full list into the app to check against if you need stricter validation.

Shout if anyone is interested in any sample code (in Swift). It doesn't need much cleaning up but I haven't got it sorted and documented to share. I wanted to get a post out while it was fresh in my mind as I haven't written anything for a few weeks.