expo-location 18.0.8-canary-20250306-d9d3e02 → 18.0.9-canary-20250320-7a205d3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/LocationEventEmitter.web.d.ts +1 -1
- package/build/LocationEventEmitter.web.d.ts.map +1 -1
- package/ios/Requesters/EXBackgroundLocationPermissionRequester.m +1 -1
- package/ios/Requesters/EXForegroundPermissionRequester.m +1 -1
- package/ios/TaskConsumers/EXLocationTaskConsumer.m +16 -15
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
### 🐛 Bug fixes
|
|
10
10
|
|
|
11
|
+
- [iOS] Remove restarting all services when CLLocationManager reports an error ([#35478](https://github.com/expo/expo/pull/35478) by [@chrfalch](https://github.com/chrfalch))
|
|
11
12
|
- [Android] Add missing ProGuard rule to fix task consumer failed ([#34098](https://github.com/expo/expo/pull/34098) by [@cornejobarraza](https://github.com/cornejobarraza))
|
|
12
13
|
- [iOS] `startLocationUpdatesAsync` should not require background permissions ([#33617](https://github.com/expo/expo/pull/33617) by [@andrejpavlovic](https://github.com/andrejpavlovic)
|
|
13
14
|
|
|
@@ -16,10 +17,17 @@
|
|
|
16
17
|
- On Android, remove dependency on `smart-location-lib`. ([#33609](https://github.com/expo/expo/pull/33609) by [@alanjhughes](https://github.com/alanjhughes))
|
|
17
18
|
- [Android] Started using expo modules gradle plugin. ([#34176](https://github.com/expo/expo/pull/34176) by [@lukmccall](https://github.com/lukmccall))
|
|
18
19
|
|
|
20
|
+
## 18.0.8 - 2025-03-14
|
|
21
|
+
|
|
22
|
+
### 💡 Others
|
|
23
|
+
|
|
24
|
+
- On iOS, added setting the scope value as per our documentation. ([#35452](https://github.com/expo/expo/pull/35452) by [@chrfalch](https://github.com/chrfalch))
|
|
25
|
+
|
|
19
26
|
## 18.0.7 - 2025-02-19
|
|
20
27
|
|
|
21
28
|
### 🐛 Bug fixes
|
|
22
29
|
|
|
30
|
+
- [iOS] Added guards to avoid task options to crash the app. ([#35477](https://github.com/expo/expo/pull/35477) by [@chrfalch](https://github.com/chrfalch))
|
|
23
31
|
- [iOS] Added error handler to the streaming location/heading methods since these can fail while streaming ([#35004](https://github.com/expo/expo/pull/35004) by [@chrfalch](https://github.com/chrfalch))
|
|
24
32
|
|
|
25
33
|
## 18.0.6 - 2025-02-10
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LocationEventEmitter: import("expo
|
|
1
|
+
export declare const LocationEventEmitter: import("expo").EventEmitterType<Record<never, never>>;
|
|
2
2
|
//# sourceMappingURL=LocationEventEmitter.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationEventEmitter.web.d.ts","sourceRoot":"","sources":["../src/LocationEventEmitter.web.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"LocationEventEmitter.web.d.ts","sourceRoot":"","sources":["../src/LocationEventEmitter.web.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,uDAAqB,CAAC"}
|
|
@@ -93,7 +93,7 @@ static SEL alwaysAuthorizationSelector;
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
return @{ @"status": @(status) };
|
|
96
|
+
return @{ @"status": @(status), @"scope": @(systemStatus == kCLAuthorizationStatusAuthorizedWhenInUse ? "whenInUse" : systemStatus == kCLAuthorizationStatusAuthorizedAlways ? "always" : "none") };
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
@end
|
|
@@ -54,7 +54,7 @@ static SEL whenInUseAuthorizationSelector;
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
return @{ @"status": @(status) };
|
|
57
|
+
return @{ @"status": @(status), @"scope": @(systemStatus == kCLAuthorizationStatusAuthorizedWhenInUse ? "whenInUse" : systemStatus == kCLAuthorizationStatusAuthorizedAlways ? "always" : "none") };
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
@end
|
|
@@ -68,11 +68,10 @@
|
|
|
68
68
|
EXLocationAccuracy accuracy = [options[@"accuracy"] unsignedIntegerValue] ?: EXLocationAccuracyBalanced;
|
|
69
69
|
|
|
70
70
|
locationManager.desiredAccuracy = [EXLocation CLLocationAccuracyFromOption:accuracy];
|
|
71
|
-
locationManager.distanceFilter = [options[@"distanceInterval"]
|
|
72
|
-
locationManager.activityType = [EXLocation CLActivityTypeFromOption:[options[@"activityType"]
|
|
73
|
-
locationManager.pausesLocationUpdatesAutomatically = [options[@"pausesUpdatesAutomatically"]
|
|
74
|
-
|
|
75
|
-
locationManager.showsBackgroundLocationIndicator = [options[@"showsBackgroundLocationIndicator"] boolValue];
|
|
71
|
+
locationManager.distanceFilter = [self numberToDouble:options[@"distanceInterval"] defaultValue:kCLDistanceFilterNone];
|
|
72
|
+
locationManager.activityType = [EXLocation CLActivityTypeFromOption:[self numberToInteger:options[@"activityType"] defaultValue:CLActivityTypeOther]];
|
|
73
|
+
locationManager.pausesLocationUpdatesAutomatically = [self numberToBool:options[@"pausesUpdatesAutomatically"] defaultValue:true];
|
|
74
|
+
locationManager.showsBackgroundLocationIndicator = [self numberToBool:options[@"showsBackgroundLocationIndicator"] defaultValue:false];
|
|
76
75
|
|
|
77
76
|
[locationManager startUpdatingLocation];
|
|
78
77
|
[locationManager startMonitoringSignificantLocationChanges];
|
|
@@ -91,15 +90,7 @@
|
|
|
91
90
|
|
|
92
91
|
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
|
|
93
92
|
{
|
|
94
|
-
|
|
95
|
-
// This error might happen when the device is not able to find out the location. Try to restart monitoring location.
|
|
96
|
-
[manager stopUpdatingLocation];
|
|
97
|
-
[manager stopMonitoringSignificantLocationChanges];
|
|
98
|
-
[manager startUpdatingLocation];
|
|
99
|
-
[manager startMonitoringSignificantLocationChanges];
|
|
100
|
-
} else {
|
|
101
|
-
[_task executeWithData:nil withError:error];
|
|
102
|
-
}
|
|
93
|
+
[_task executeWithData:nil withError:error];
|
|
103
94
|
}
|
|
104
95
|
|
|
105
96
|
# pragma mark - internal
|
|
@@ -172,7 +163,17 @@
|
|
|
172
163
|
|
|
173
164
|
- (double)numberToDouble:(NSNumber *)number defaultValue:(double)defaultValue
|
|
174
165
|
{
|
|
175
|
-
return number == nil ? defaultValue : [number doubleValue];
|
|
166
|
+
return [number isEqual:[NSNull null]] || number == nil ? defaultValue : [number doubleValue];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
- (NSInteger)numberToInteger:(NSNumber *)number defaultValue:(NSInteger)defaultValue
|
|
170
|
+
{
|
|
171
|
+
return [number isEqual:[NSNull null]] || number == nil ? defaultValue : [number integerValue];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
- (BOOL)numberToBool:(NSNumber *)number defaultValue:(BOOL)defaultValue
|
|
175
|
+
{
|
|
176
|
+
return [number isEqual:[NSNull null]] || number == nil ? defaultValue : [number boolValue];
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
+ (NSArray<NSDictionary *> *)_exportLocations:(NSArray<CLLocation *> *)locations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-location",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.9-canary-20250320-7a205d3",
|
|
4
4
|
"description": "Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -39,10 +39,9 @@
|
|
|
39
39
|
"preset": "expo-module-scripts"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"expo-module-scripts": "4.0.5-canary-
|
|
42
|
+
"expo-module-scripts": "4.0.5-canary-20250320-7a205d3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"expo": "53.0.0-canary-
|
|
46
|
-
}
|
|
47
|
-
"gitHead": "d9d3e024d8742099c307754673f17117a20c1dea"
|
|
45
|
+
"expo": "53.0.0-canary-20250320-7a205d3"
|
|
46
|
+
}
|
|
48
47
|
}
|