not calling locationManager:didUpdateLocations:

enter image description hereJust add this in info.plistios

NSLocationAlwaysUsageDescription --- I need Locationthis

NSLocationWhenInUseUsageDescription --- I need Locationspa

privacy - location usage description --- I need Location.net

  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.code

for more details click hereorm

相關文章
相關標籤/搜索