I'm using iOS8 [8.0.2]
and no matter what I try I cant get the CLLocationManager
to work.
I added the following lines to info.plist
.
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app use location services.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app use location services.</string>
In my implementation file :
In ViewDidLoad :
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = kCLDistanceFilterNone;
[locationManager requestAlwaysAuthorization];
[locationManager startUpdatingLocation];
But none of the below methods are being called.
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
- (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
What is that I'm missing?