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

Note that “I need Location” should be changed to describe your actual app’s designed usage. It is communicated to the end user in the authorization message. (thanks @devios1)

  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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)