Search code examples
swiftwatchkitcllocationmanagerwatchos-2

CLLocationManager multiple delegate calls Apple Watch


I am trying to use CLLocationManager on a WatchKit app, and I think I am experiencing unexpected behavior:

I have a CLLocationManager as a class variable named manager, and when I call self.manager.requestLocation(); on the Apple Watch, sometimes, it calls the delegate didUpdateLocations only once, and other times the delegate gets called multiple times.

Is this expected behavior, even though I only called the requestLocation method once? If not, is there a workaround?


Solution

  • It normal, due to the fact that it sometimes adjusts the location quickly if its not 100% correct. At least thats what I've concluded. That being said, you really should offload location fetching to the phone instead of using the watch if possible due to battery concerns.