So, on iOS9, a new requestLocation() method has requestLocation() . I try to use it to get only one location update, but it hits didUpdateLocations several times.
Shouldn't it be called only once? I set distanceFilter to 1000.0, so it's pretty wide to get back quickly. Any ideas?
even if I call stopUpdatingLocation() inside the delegate method, I still get three delegate calls.
Note: the same behavior occurs when I use StartUpdatingLocation instead, I want only one return, since I want to get the current country of the user, so send this place to reversegeocoder
early
Here is the code:
func getLocationOneTime(accuracy: Double){ print("Acquiring location one time - accuracy requested:\(accuracy)") locationManager.distanceFilter = accuracy locationManager.desiredAccuracy = accuracy // Start gpsOneTimeTimeout timer gpsTimeoutTimer = NSTimer.scheduledTimerWithTimeInterval(gpsOneTimeTimeout, target: self, selector:
source share