I am using this code for current location in ios 8, but this give the error on 3rd line error is "no known class method for selector' requestAlwaysAuthorization".
if ([CLLocationManager respondsToSelector:
@selector(requestWhenInUseAuthorization)]) {
[CLLocationManager requestWhenInUseAuthorization];
}