If you are targeting iOS 4.2 and above, just use [CLLocationManager authorizationStatus]
It will return one of the following values CLAuthorizationStatus, which are mostly integers:
typedef enum {
kCLAuthorizationStatusNotDetermined = 0,
kCLAuthorizationStatusRestricted,
kCLAuthorizationStatusDenied,
kCLAuthorizationStatusAuthorized
} CLAuthorizationStatus;
For more information, find the documents for "CLLocationManager".
taber source
share