[CLLocationManager locationServicesEnabled]
&& [CLLocationManager authorizationStatus] != kCLAuthorizationStatusDenied)
CLAuthorizationStatus
These constants indicate whether the application is authorized to use location services.
typedef enum {
kCLAuthorizationStatusNotDetermined = 0,
kCLAuthorizationStatusRestricted,
kCLAuthorizationStatusDenied,
kCLAuthorizationStatusAuthorized
} CLAuthorizationStatus;
Constants
kCLAuthorizationStatusNotDetermined
The user has not yet made a choice regarding whether this application can use location services.
Available in iOS 4.2 and later.
Declared in CLLocationManager.h.
kCLAuthorizationStatusRestricted
This application is not authorized to use location services. The user cannot change this application’s status, possibly due to active restrictions such as parental controls being in place.
Available in iOS 4.2 and later.
Declared in CLLocationManager.h.
kCLAuthorizationStatusDenied
The user explicitly denied the use of location services for this application or location services are currently disabled in Settings.
Available in iOS 4.2 and later.
Declared in CLLocationManager.h.
kCLAuthorizationStatusAuthorized
This application is authorized to use location services.
Available in iOS 4.2 and later.
Declared in CLLocationManager.h.