CLLocationManager startUpdatingLocation not calling locationManager:didUpdateLocations: or locationManager:didFailWithError: CLLocationManager startUpdatingLocation not calling locationManager:didUpdateLocations: or locationManager:didFailWithError: ios ios

CLLocationManager startUpdatingLocation not calling locationManager:didUpdateLocations: or locationManager:didFailWithError:


enter image description hereJust add this in info.plist

NSLocationAlwaysUsageDescription --- I need Location

NSLocationWhenInUseUsageDescription --- I need Location

privacy - location usage description --- I need Location

  locationManager = [[CLLocationManager alloc] init];  locationManager.delegate=self;  locationManager.desiredAccuracy=kCLLocationAccuracyBest;  locationManager.distanceFilter=kCLDistanceFilterNone;  [locationManager requestWhenInUseAuthorization];  [locationManager startMonitoringSignificantLocationChanges];  [locationManager startUpdatingLocation];

Now it will call your didUpdateToLocation definitely.

for more details click here


You strongly need to check that you initialize CLLocationManager on main thread.In other case you will not get updateLocation event.

I can't find such info in Apple docs but it works for me anyway.


Location Services work a bit differently starting in iOS 8.

Mainly, you need to add a key NSLocationWhenInUseUsageDescription to your Info.plist file, and add a description why your app need Location, such as "Location needed to ...".

Note that you might also have to check for iOS version. Only iOS 8 and up have the Location Manager listen to the requestWhenInUseAuthorization call.

The link below shows more details:http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/

Good luck!