1. 照相机
// TODO: 检查应用是否有使用carema的权限
+ (BOOL)isCameraDeviceAuthorized
{
AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
return status == AVAuthorizationStatusAuthorized;
}
2. 定位服务
[CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized