CLLocationManager not working in iOS8?

iOS8 has added some security measures to their GPS location services to make sure the user gives permission to track the device. First, you need to add a NSLocationWhenInUseUsageDescription String entry into your Info.plist file. This contains the text you want to display to the user when they are asked for permission to grab their GPS location. If you right click on Info.plist and ‘Open As->Source Code’, add something similar to this:

    <key>NSLocationWhenInUseUsageDescription</key>
    <string>We need to use your GPS to determine your location.</string>

You also need to make sure the user is asked for permission with the requestWhenInUseAuthorization call. This will only work in viewWillAppear: or later. Its a good idea to initialize the locationManager in viewDidLoad: so your code may look like this:

- (void)viewDidLoad {
    [super viewDidLoad];

    _locationManager = [[CLLocationManager alloc] init];
    _locationManager.delegate = self;
    _locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    [_locationManager startUpdatingLocation];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    // for iOS8 request authorization
    if ([_locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
        [_locationManager requestWhenInUseAuthorization];
    }
}

With those two changes, your app should again be retrieving gps locations. Background locations are handled in another (but similar) way.