You need to add a call to requestWhenInUseAuthorization
when using location services for iOS-8.0 and above. Find the sample code below.
locationManager = [[CLLocationManager alloc]init];
locationManager.delegate = self;
// this check is required for iOS 8+
// selector 'requestWhenInUseAuthorization' is first introduced in iOS 8
if ([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
[locationManager requestWhenInUseAuthorization];
}
[locationManager startUpdatingLocation];
For more information see this blog.
Hope this helps.