reverseGeocode - always error 2 - watchOS2

Hey all,


Still having the same issue on watchOS 2 GM as I've had with every watchOS 2 beta.

When calling reverseGeocode within my watchOS 2 extension with a valid location, the geoCoder returns with kCLErrorDomain error 2 every time.

This occurs on the simulator using the Apple simulated location, as well as on my actual Apple Watch in Santa Monica, CA.


My code is not calling reverseGeocode more than once, so I do not see how it could be an issue of calling the reverseGeocode too often.

CLLocationManager is able to successfully pull the location, and other NSURL requests complete without issue from my watchOS 2 extension, so network access does not appear to be an issue.


The watchOS 2 component of my app has been ready for weeks now with the exception of this reverseGeocoding failure.

=\


There was another thread regarding this same problem a few weeks back, but that seems to be dead now.

Has anyone else encountered this problem and found a solution?

Hi Evan,

I have the same problem as you on the Simulator, but am able to get this working on the device (may need to uninstall/reinstall the app on phone/watch as I had to).


Here's my sample method which is working (although it takes ~5-6 seconds to return)



func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation])

{

guard let currentLocation = locations.first else

{

return

}

CLGeocoder().reverseGeocodeLocation(currentLocation) { (placemarks, error) -> Void in

guard let placemark = placemarks?.first else

{

return

}

self.lab.setText(placemark.postalCode)

}

}

reverseGeocode - always error 2 - watchOS2
 
 
Q