You need to check [CLLocationManager authorizationStatus]
, not locationServicesEnabled
. Authorization status returns an app-specific value, one of the following:
typedef enum {
kCLAuthorizationStatusNotDetermined = 0,
kCLAuthorizationStatusRestricted,
kCLAuthorizationStatusDenied,
kCLAuthorizationStatusAuthorized
} CLAuthorizationStatus;
The names are hopefully self-explanatory.