CLLocationManager
Requesting Authorization for Location Services
- (void)requestWhenInUseAuthorization - (void)requestAlwaysAuthorization
Determining the Availability of Services
+ (CLAuthorizationStatus)authorizationStatus + (BOOL)locationServicesEnabled + (BOOL)deferredLocationUpdatesAvailable + (BOOL)significantLocationChangeMonitoringAvailable + (BOOL)headingAvailable + (BOOL)isMonitoringAvailableForClass:(Class)regionClass + (BOOL)isRangingAvailable
配置状态CLAuthorizationStatus:
typedef enum { kCLAuthorizationStatusNotDetermined = 0,//未设置 kCLAuthorizationStatusRestricted ,//不允许使用而且不可设置。例如家长控制等 kCLAuthorizationStatusDenied ,//不允许使用 kCLAuthorizationStatusAuthorized ,//可以使用。IOS8反对使用。 kCLAuthorizationStatusAuthorizedAlways = kCLAuthorizationStatusAuthorized ,//IOS8新增 kCLAuthorizationStatusAuthorizedWhenInUse //IOS8新增 } CLAuthorizationStatus;