|
|
|
|
27
|
|
27
|
|
28
|
- (void)checkWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
|
28
|
- (void)checkWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
|
29
|
rejecter:(void (__unused ^ _Nonnull)(NSError * _Nonnull))reject {
|
29
|
rejecter:(void (__unused ^ _Nonnull)(NSError * _Nonnull))reject {
|
30
|
- if (![CLLocationManager locationServicesEnabled] || ![RNPermissions isBackgroundModeEnabled:@"location"]) {
|
|
|
|
|
30
|
+ if (![CLLocationManager locationServicesEnabled]) {
|
31
|
return resolve(RNPermissionStatusNotAvailable);
|
31
|
return resolve(RNPermissionStatusNotAvailable);
|
32
|
}
|
32
|
}
|
33
|
|
33
|
|
|
|
|
|
46
|
|
46
|
|
47
|
- (void)requestWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
|
47
|
- (void)requestWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
|
48
|
rejecter:(void (^ _Nonnull)(NSError * _Nonnull))reject {
|
48
|
rejecter:(void (^ _Nonnull)(NSError * _Nonnull))reject {
|
49
|
- if (![CLLocationManager locationServicesEnabled] || ![RNPermissions isBackgroundModeEnabled:@"location"]) {
|
|
|
|
|
49
|
+ if (![CLLocationManager locationServicesEnabled]) {
|
50
|
return resolve(RNPermissionStatusNotAvailable);
|
50
|
return resolve(RNPermissionStatusNotAvailable);
|
51
|
}
|
51
|
}
|
52
|
if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusNotDetermined) {
|
52
|
if ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusNotDetermined) {
|