KVO on CLLocationManager.location?

In our existing code, we have a couple of CLLocationManager instances that update location at different frequencies. In one part of our code, rather than grab the location from those handed back in the delegate callback, we grab it via CLLocationManager.location. We've noticed that this location manager's location gets updated out-of-band by updates to other instances.

A couple of questions:

  1. Is this expected behavior? I couldn't find any documentation on this one way or the other. Do all instances of CLLocationManager share updates to the last-known location?
  2. Is there a way to KVO updates to that property? It doesn't seem to be KVO-compliant in my testing.

Using CLLocationManager.location directly for repeated updates is discouraged. It is not a simple ivar backed property, and as such, it is an expensive operation to read it.

We would recommend to grab the CLLocation objects passed to the delegate methods, and store it in a KVO-compliant variable instead.

In the cases of multiple CLLocationManager instances, regardless of what a specific instance requests as far as location (accuracy, etc.) it will be opportunistically updated with the best available location the device knows about even if it may not have asked for it itself.

KVO on CLLocationManager.location?
 
 
Q