expo-location 58.0.4 → 58.0.5
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 +7 -0
- package/android/build.gradle +2 -2
- package/expo-module.config.json +1 -1
- package/ios/ExpoLocation.podspec +6 -1
- package/ios/LocationExceptions.swift +7 -0
- package/ios/LocationModule.swift +37 -12
- package/ios/Providers/MotionActivityStreamer.swift +2 -0
- package/ios/Requesters/MotionActivityPermissionRequester.swift +2 -0
- package/ios/TaskConsumers/EXGeofencingTaskConsumer.m +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.module → 58.0.5/expo.modules.location-58.0.5.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.pom → 58.0.5/expo.modules.location-58.0.5.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.5/expo.modules.location-58.0.5.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -7
- package/plugin/build/withLocation.d.ts +3 -3
- package/plugin/build/withLocation.js +8 -0
- package/plugin/build/withLocation.js.map +1 -1
- package/plugin/src/withLocation.ts +13 -3
- package/spm.config.json +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.4/expo.modules.location-58.0.4.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4-sources.jar → 58.0.5/expo.modules.location-58.0.5-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4-sources.jar.md5 → 58.0.5/expo.modules.location-58.0.5-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4-sources.jar.sha1 → 58.0.5/expo.modules.location-58.0.5-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4-sources.jar.sha256 → 58.0.5/expo.modules.location-58.0.5-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4-sources.jar.sha512 → 58.0.5/expo.modules.location-58.0.5-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.aar → 58.0.5/expo.modules.location-58.0.5.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.aar.md5 → 58.0.5/expo.modules.location-58.0.5.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.aar.sha1 → 58.0.5/expo.modules.location-58.0.5.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.aar.sha256 → 58.0.5/expo.modules.location-58.0.5.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.4/expo.modules.location-58.0.4.aar.sha512 → 58.0.5/expo.modules.location-58.0.5.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 58.0.5 — 2026-09-22
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Exclude the CoreMotion features from the build when `motionUsagePermission: false` is set in `app.json`. ([#49409](https://github.com/expo/expo/pull/49409) by [@Wenszel](https://github.com/Wenszel))
|
|
18
|
+
- [iOS] Stop requiring the `location` background mode for geofencing. Region monitoring does not need it, and declaring it without a feature that uses persistent location gets apps rejected under App Store guideline 2.5.4. ([#50197](https://github.com/expo/expo/pull/50197) by [@abappi19](https://github.com/abappi19))
|
|
19
|
+
|
|
13
20
|
## 58.0.4 — 2026-09-21
|
|
14
21
|
|
|
15
22
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,13 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '58.0.
|
|
7
|
+
version = '58.0.5'
|
|
8
8
|
|
|
9
9
|
android {
|
|
10
10
|
namespace "expo.modules.location"
|
|
11
11
|
defaultConfig {
|
|
12
12
|
versionCode 29
|
|
13
|
-
versionName "58.0.
|
|
13
|
+
versionName "58.0.5"
|
|
14
14
|
consumerProguardFiles("proguard-rules.pro")
|
|
15
15
|
}
|
|
16
16
|
}
|
package/expo-module.config.json
CHANGED
package/ios/ExpoLocation.podspec
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'json'
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
+
podfile_properties = JSON.parse(File.read("#{Pod::Config.instance.installation_root}/Podfile.properties.json")) rescue {}
|
|
4
5
|
|
|
5
6
|
Pod::Spec.new do |s|
|
|
6
7
|
s.name = 'ExpoLocation'
|
|
@@ -19,9 +20,13 @@ Pod::Spec.new do |s|
|
|
|
19
20
|
s.dependency 'ExpoModulesCore'
|
|
20
21
|
|
|
21
22
|
# Swift/Objective-C compatibility
|
|
22
|
-
|
|
23
|
+
pod_target_xcconfig = {
|
|
23
24
|
'DEFINES_MODULE' => 'YES',
|
|
24
25
|
}
|
|
26
|
+
if podfile_properties['expo.location.motionActivityEnabled'] == 'false'
|
|
27
|
+
pod_target_xcconfig['OTHER_SWIFT_FLAGS'] = '$(inherited) -DEXPO_LOCATION_DISABLE_MOTION'
|
|
28
|
+
end
|
|
29
|
+
s.pod_target_xcconfig = pod_target_xcconfig
|
|
25
30
|
|
|
26
31
|
s.source_files = "**/*.{h,m,swift}"
|
|
27
32
|
end
|
|
@@ -77,6 +77,13 @@ extension Exceptions {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
internal final class MotionActivityDisabled: Exception {
|
|
81
|
+
override var reason: String {
|
|
82
|
+
"Motion activity was disabled by setting 'motionUsagePermission' to false in the config plugin. " +
|
|
83
|
+
"Remove the option and run 'npx expo prebuild' again to enable it"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
internal final class MotionActivityUnauthorized: Exception {
|
|
81
88
|
override var reason: String {
|
|
82
89
|
"Motion activity access has been denied. Add NSMotionUsageDescription to Info.plist, " +
|
package/ios/LocationModule.swift
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Copyright 2023-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
3
|
import CoreLocation
|
|
4
|
+
#if !EXPO_LOCATION_DISABLE_MOTION
|
|
4
5
|
import CoreMotion
|
|
6
|
+
#endif
|
|
5
7
|
import ExpoModulesCore
|
|
6
8
|
|
|
7
9
|
private let EVENT_LOCATION_CHANGED = "Expo.locationChanged"
|
|
@@ -11,7 +13,9 @@ private let EVENT_MOTION_ACTIVITY_CHANGED = "Expo.motionActivityChanged"
|
|
|
11
13
|
|
|
12
14
|
public final class LocationModule: Module {
|
|
13
15
|
private lazy var locationStreamers = [Int: BaseStreamer]()
|
|
16
|
+
#if !EXPO_LOCATION_DISABLE_MOTION
|
|
14
17
|
private lazy var motionActivityStreamers = [Int: MotionActivityStreamer]()
|
|
18
|
+
#endif
|
|
15
19
|
|
|
16
20
|
private var taskManager: EXTaskManagerInterface {
|
|
17
21
|
get throws {
|
|
@@ -29,15 +33,15 @@ public final class LocationModule: Module {
|
|
|
29
33
|
|
|
30
34
|
OnCreate {
|
|
31
35
|
let permissionsManager = self.appContext?.permissions
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
36
|
+
var requesters: [EXPermissionsRequester] = [
|
|
37
|
+
EXLocationPermissionRequester(),
|
|
38
|
+
EXForegroundPermissionRequester(),
|
|
39
|
+
EXBackgroundLocationPermissionRequester()
|
|
40
|
+
]
|
|
41
|
+
#if !EXPO_LOCATION_DISABLE_MOTION
|
|
42
|
+
requesters.append(MotionActivityPermissionRequester())
|
|
43
|
+
#endif
|
|
44
|
+
EXPermissionsMethodsDelegate.register(requesters, withPermissionsManager: permissionsManager)
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
AsyncFunction("getProviderStatusAsync") {
|
|
@@ -122,6 +126,9 @@ public final class LocationModule: Module {
|
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
AsyncFunction("watchMotionActivityImplAsync") { (watchId: Int) in
|
|
129
|
+
#if EXPO_LOCATION_DISABLE_MOTION
|
|
130
|
+
throw Exceptions.MotionActivityDisabled()
|
|
131
|
+
#else
|
|
125
132
|
guard CMMotionActivityManager.isActivityAvailable() else {
|
|
126
133
|
throw Exceptions.MotionActivityUnavailable()
|
|
127
134
|
}
|
|
@@ -164,6 +171,7 @@ public final class LocationModule: Module {
|
|
|
164
171
|
sendEvent(EVENT_LOCATION_ERROR, ["watchId": watchId, "reason": error.localizedDescription])
|
|
165
172
|
}
|
|
166
173
|
}
|
|
174
|
+
#endif
|
|
167
175
|
}
|
|
168
176
|
|
|
169
177
|
AsyncFunction("removeWatchAsync") { (watchId: Int) in
|
|
@@ -172,10 +180,12 @@ public final class LocationModule: Module {
|
|
|
172
180
|
}
|
|
173
181
|
locationStreamers[watchId] = nil
|
|
174
182
|
|
|
183
|
+
#if !EXPO_LOCATION_DISABLE_MOTION
|
|
175
184
|
if let streamer = motionActivityStreamers[watchId] {
|
|
176
185
|
streamer.stopStreaming()
|
|
177
186
|
}
|
|
178
187
|
motionActivityStreamers[watchId] = nil
|
|
188
|
+
#endif
|
|
179
189
|
}
|
|
180
190
|
|
|
181
191
|
AsyncFunction("geocodeAsync") { (address: String) in
|
|
@@ -187,11 +197,29 @@ public final class LocationModule: Module {
|
|
|
187
197
|
}
|
|
188
198
|
|
|
189
199
|
AsyncFunction("getMotionActivityPermissionsAsync") { (promise: Promise) in
|
|
200
|
+
#if EXPO_LOCATION_DISABLE_MOTION
|
|
201
|
+
promise.resolve([
|
|
202
|
+
"status": "denied",
|
|
203
|
+
"expires": "never",
|
|
204
|
+
"granted": false,
|
|
205
|
+
"canAskAgain": false
|
|
206
|
+
])
|
|
207
|
+
#else
|
|
190
208
|
try getPermissionUsingRequester(MotionActivityPermissionRequester.self, appContext: appContext, promise: promise)
|
|
209
|
+
#endif
|
|
191
210
|
}
|
|
192
211
|
|
|
193
212
|
AsyncFunction("requestMotionActivityPermissionsAsync") { (promise: Promise) in
|
|
213
|
+
#if EXPO_LOCATION_DISABLE_MOTION
|
|
214
|
+
promise.resolve([
|
|
215
|
+
"status": "denied",
|
|
216
|
+
"expires": "never",
|
|
217
|
+
"granted": false,
|
|
218
|
+
"canAskAgain": false
|
|
219
|
+
])
|
|
220
|
+
#else
|
|
194
221
|
try askForPermissionUsingRequester(MotionActivityPermissionRequester.self, appContext: appContext, promise: promise)
|
|
222
|
+
#endif
|
|
195
223
|
}
|
|
196
224
|
|
|
197
225
|
AsyncFunction("getPermissionsAsync") { (promise: Promise) in
|
|
@@ -263,9 +291,6 @@ public final class LocationModule: Module {
|
|
|
263
291
|
guard CLLocationManager.isMonitoringAvailable(for: CLCircularRegion.self) else {
|
|
264
292
|
throw Exceptions.GeofencingUnavailable()
|
|
265
293
|
}
|
|
266
|
-
guard try taskManager.hasBackgroundModeEnabled("location") else {
|
|
267
|
-
throw Exceptions.LocationUpdatesUnavailable()
|
|
268
|
-
}
|
|
269
294
|
|
|
270
295
|
try taskManager.registerTask(withName: taskName, consumer: EXGeofencingTaskConsumer.self, options: options)
|
|
271
296
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.location",
|
|
6
|
-
"version": "58.0.
|
|
6
|
+
"version": "58.0.5",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"files": [
|
|
35
35
|
{
|
|
36
|
-
"name": "expo.modules.location-58.0.
|
|
37
|
-
"url": "expo.modules.location-58.0.
|
|
36
|
+
"name": "expo.modules.location-58.0.5.aar",
|
|
37
|
+
"url": "expo.modules.location-58.0.5.aar",
|
|
38
38
|
"size": 265692,
|
|
39
39
|
"sha512": "16b1bbcda611d245cb52ac30c090f81ab6327c038494ce2c968772507cf069fe005f4e8965652142107d66b7be4b25933bc5d5f379404954b14f642d1917fec0",
|
|
40
40
|
"sha256": "6d5bcc1408728b6ea033b40e0ae28d80275a22781bec89651eede2f738e4ace4",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
],
|
|
84
84
|
"files": [
|
|
85
85
|
{
|
|
86
|
-
"name": "expo.modules.location-58.0.
|
|
87
|
-
"url": "expo.modules.location-58.0.
|
|
86
|
+
"name": "expo.modules.location-58.0.5.aar",
|
|
87
|
+
"url": "expo.modules.location-58.0.5.aar",
|
|
88
88
|
"size": 265692,
|
|
89
89
|
"sha512": "16b1bbcda611d245cb52ac30c090f81ab6327c038494ce2c968772507cf069fe005f4e8965652142107d66b7be4b25933bc5d5f379404954b14f642d1917fec0",
|
|
90
90
|
"sha256": "6d5bcc1408728b6ea033b40e0ae28d80275a22781bec89651eede2f738e4ace4",
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
},
|
|
104
104
|
"files": [
|
|
105
105
|
{
|
|
106
|
-
"name": "expo.modules.location-58.0.
|
|
107
|
-
"url": "expo.modules.location-58.0.
|
|
106
|
+
"name": "expo.modules.location-58.0.5-sources.jar",
|
|
107
|
+
"url": "expo.modules.location-58.0.5-sources.jar",
|
|
108
108
|
"size": 25844,
|
|
109
109
|
"sha512": "bfea0208da5ab86f19745dffe0c46699951a1f0c6a98f17c7d09cfcfa7f843b3fbaffa644c94136e35a1911fc980a9b2e57115457bd3c8510c14d92a3dd4b7fb",
|
|
110
110
|
"sha256": "b9a242d6e38f2e9f948c08b78c6a311c4b3651db39ae4c24b1c4d4e9ef29eaef",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b75a00572cb5006a34f30b7728060639
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
76ffac0d4bf281d1f28630fa8c2d2974d0ecd8c1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
229b4f51fa661fec0dd6d5abf126a7058d11b5a216b27b1c839cd0c094c31461
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
15ee86e6808fc7ee0f3cf03c118e19638376ec695f0628638940e28f8c7a4132c2d5205b1ed423fdbd3a8d6ecbce123584d12b2398f8a1e8b5b3ca730bc0cf47
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.location</artifactId>
|
|
12
|
-
<version>58.0.
|
|
12
|
+
<version>58.0.5</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.location</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a834a0dc17e7865d663bcac4c1b40cae
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fc095c118b10227950a2e4f7b8c5cadc569868a5
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
416485186e52a79329e7cc01bdb1cfba751a23369928b5f026852d131af6731f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
400eb3b8656d7c35382471afe03282b66f7adb01b286bbb33e4fe3757ae540b30efb143aab38e5ba8d5ceda72c0a780bc6b6bd713b0ea0d1c941024ba298bad0
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.location</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>58.0.
|
|
7
|
-
<release>58.0.
|
|
6
|
+
<latest>58.0.5</latest>
|
|
7
|
+
<release>58.0.5</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>58.0.
|
|
9
|
+
<version>58.0.5</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260922160130</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
485d96ec64e99a4f41b79a5a5cc4017d
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2fd9d410203cd48047a374a1a86719d4011be177
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3ca1bb2aae20ba255258eaaf2200e43e948e54fde665c1d5c71de7f4f160d271
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c5a88a1baf4accdf07c0f8f35ed902d62bd77c5cfd5c1dddfc6017400e59499fdf8e19162e7f7478b2817e117586e1abf94f9b0ee61da3333d9231102b89ad07
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-location",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.5",
|
|
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
|
"keywords": [
|
|
6
6
|
"compass",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/jest": "^29.2.1",
|
|
34
34
|
"@types/node": "^22.14.0",
|
|
35
35
|
"@types/react": "~19.3.0",
|
|
36
|
-
"expo": "58.0.0-preview.
|
|
36
|
+
"expo": "58.0.0-preview.5",
|
|
37
37
|
"expo-module-scripts": "56.0.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -41,12 +41,8 @@
|
|
|
41
41
|
"react": "*",
|
|
42
42
|
"react-native": "*"
|
|
43
43
|
},
|
|
44
|
-
"
|
|
45
|
-
"preset": "expo-module-scripts"
|
|
46
|
-
},
|
|
47
|
-
"gitHead": "ebb1fd7569c9c9e172cb9abd73dfede027c1d674",
|
|
44
|
+
"gitHead": "add8cbf49f477cfd2283ae05af35b4713a773c55",
|
|
48
45
|
"scripts": {
|
|
49
|
-
"precompile-ios": "et prebuild-package-for-publish",
|
|
50
46
|
"build": "pnpm run build:lib && pnpm run build:plugin",
|
|
51
47
|
"build:lib": "expo-build src",
|
|
52
48
|
"build:plugin": "expo-build --base plugin cjs:src",
|
|
@@ -38,9 +38,9 @@ export type Props = {
|
|
|
38
38
|
/**
|
|
39
39
|
* A string to set the `NSMotionUsageDescription` permission message shown when
|
|
40
40
|
* `getMotionActivityAsync` or `watchMotionActivityAsync` is called for the first time.
|
|
41
|
-
* Set to `false` to
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
* Set to `false` to disable the motion activity feature: the key is removed from `Info.plist`,
|
|
42
|
+
* the CoreMotion features are excluded from the iOS build, motion permission methods resolve
|
|
43
|
+
* with a denied response, and calling motion activity APIs throws an exception.
|
|
44
44
|
* @default "Allow $(PRODUCT_NAME) to detect your current motion activity"
|
|
45
45
|
* @platform ios
|
|
46
46
|
*/
|
|
@@ -185,6 +185,14 @@ const withLocation = (config, { locationAlwaysAndWhenInUsePermission, locationAl
|
|
|
185
185
|
if (isIosBackgroundLocationEnabled) {
|
|
186
186
|
config = withBackgroundLocation(config);
|
|
187
187
|
}
|
|
188
|
+
config = (0, _configplugins().withPodfileProperties)(config, (config)=>{
|
|
189
|
+
if (motionUsagePermission === false) {
|
|
190
|
+
config.modResults['expo.location.motionActivityEnabled'] = 'false';
|
|
191
|
+
} else {
|
|
192
|
+
delete config.modResults['expo.location.motionActivityEnabled'];
|
|
193
|
+
}
|
|
194
|
+
return config;
|
|
195
|
+
});
|
|
188
196
|
config = withForegroundServiceIcon(config, {
|
|
189
197
|
icon: androidForegroundServiceIcon ?? null
|
|
190
198
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["withLocation.ts"],"sourcesContent":[null],"names":["ANDROID_RES_PATH","FOREGROUND_SERVICE_ICON","FOREGROUND_SERVICE_ICON_RESOURCE","META_DATA_FOREGROUND_SERVICE_ICON","dpiValues","setForegroundServiceIconAsync","withForegroundServiceIcon","pkg","require","LOCATION_USAGE","MOTION_USAGE","mdpi","folderName","scale","hdpi","xhdpi","xxhdpi","xxxhdpi","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","BASELINE_PIXEL_SIZE","ERROR_MSG_PREFIX","withBackgroundLocation","config","withInfoPlist","Array","isArray","modResults","UIBackgroundModes","includes","push","icon","configWithIconAssets","withDangerousMod","modRequest","projectRoot","withAndroidManifest","manifest","mainApplication","writeForegroundServiceIconImageFilesAsync","removeForegroundServiceIconImageFiles","Promise","all","Object","values","map","drawableFolderName","replace","dpiFolderPath","resolve","existsSync","mkdirSync","recursive","iconSizePx","resizedIcon","generateImageAsync","cacheType","src","width","height","resizeMode","backgroundColor","source","writeFileSync","e","Error","forEach","iconFile","unlinkSync","withLocation","locationAlwaysAndWhenInUsePermission","locationAlwaysPermission","locationWhenInUsePermission","motionUsagePermission","isIosBackgroundLocationEnabled","isAndroidBackgroundLocationEnabled","isAndroidForegroundServiceEnabled","isAndroidMotionActivityEnabled","androidForegroundServiceIcon","IOSConfig","Permissions","createPermissionsPlugin","NSLocationAlwaysAndWhenInUseUsageDescription","NSLocationAlwaysUsageDescription","NSLocationWhenInUseUsageDescription","NSMotionUsageDescription","enableAndroidForegroundService","withPermissions","filter","Boolean","createRunOncePlugin","name","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["withLocation.ts"],"sourcesContent":[null],"names":["ANDROID_RES_PATH","FOREGROUND_SERVICE_ICON","FOREGROUND_SERVICE_ICON_RESOURCE","META_DATA_FOREGROUND_SERVICE_ICON","dpiValues","setForegroundServiceIconAsync","withForegroundServiceIcon","pkg","require","LOCATION_USAGE","MOTION_USAGE","mdpi","folderName","scale","hdpi","xhdpi","xxhdpi","xxxhdpi","addMetaDataItemToMainApplication","getMainApplicationOrThrow","removeMetaDataItemFromMainApplication","AndroidConfig","Manifest","BASELINE_PIXEL_SIZE","ERROR_MSG_PREFIX","withBackgroundLocation","config","withInfoPlist","Array","isArray","modResults","UIBackgroundModes","includes","push","icon","configWithIconAssets","withDangerousMod","modRequest","projectRoot","withAndroidManifest","manifest","mainApplication","writeForegroundServiceIconImageFilesAsync","removeForegroundServiceIconImageFiles","Promise","all","Object","values","map","drawableFolderName","replace","dpiFolderPath","resolve","existsSync","mkdirSync","recursive","iconSizePx","resizedIcon","generateImageAsync","cacheType","src","width","height","resizeMode","backgroundColor","source","writeFileSync","e","Error","forEach","iconFile","unlinkSync","withLocation","locationAlwaysAndWhenInUsePermission","locationAlwaysPermission","locationWhenInUsePermission","motionUsagePermission","isIosBackgroundLocationEnabled","isAndroidBackgroundLocationEnabled","isAndroidForegroundServiceEnabled","isAndroidMotionActivityEnabled","androidForegroundServiceIcon","withPodfileProperties","IOSConfig","Permissions","createPermissionsPlugin","NSLocationAlwaysAndWhenInUseUsageDescription","NSLocationAlwaysUsageDescription","NSLocationWhenInUseUsageDescription","NSMotionUsageDescription","enableAndroidForegroundService","withPermissions","filter","Boolean","createRunOncePlugin","name","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;QAqBaA;eAAAA;;QAgBAC;eAAAA;;QACAC;eAAAA;;QACAC;eAAAA;;QAsOb;eAAA;;QAvPaC;eAAAA;;QAoESC;eAAAA;;QArCTC;eAAAA;;;;yBArDsB;;;;;;;yBAU5B;;;;;;;yBAC0D;;;;;;;yBACzC;;;;;;AAExB,MAAMC,MAAMC,QAAQ;AACpB,MAAMC,iBAAiB;AACvB,MAAMC,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AAkC;KACnC,CAACY,MAAM,CAACC;AAEb;MAEA,WAAeC,IAAAA,oCAAmB,EAACtB,cAAcjE,IAAIwF,IAAI,EAAExF,IAAIyF,OAAO"}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
withInfoPlist,
|
|
8
8
|
withDangerousMod,
|
|
9
9
|
withAndroidManifest,
|
|
10
|
+
withPodfileProperties,
|
|
10
11
|
} from 'expo/config-plugins';
|
|
11
12
|
import { writeFileSync, unlinkSync, existsSync, mkdirSync } from 'fs';
|
|
12
13
|
import { resolve } from 'path';
|
|
@@ -161,9 +162,9 @@ export type Props = {
|
|
|
161
162
|
/**
|
|
162
163
|
* A string to set the `NSMotionUsageDescription` permission message shown when
|
|
163
164
|
* `getMotionActivityAsync` or `watchMotionActivityAsync` is called for the first time.
|
|
164
|
-
* Set to `false` to
|
|
165
|
-
*
|
|
166
|
-
*
|
|
165
|
+
* Set to `false` to disable the motion activity feature: the key is removed from `Info.plist`,
|
|
166
|
+
* the CoreMotion features are excluded from the iOS build, motion permission methods resolve
|
|
167
|
+
* with a denied response, and calling motion activity APIs throws an exception.
|
|
167
168
|
* @default "Allow $(PRODUCT_NAME) to detect your current motion activity"
|
|
168
169
|
* @platform ios
|
|
169
170
|
*/
|
|
@@ -218,6 +219,15 @@ const withLocation: ConfigPlugin<Props | void> = (
|
|
|
218
219
|
config = withBackgroundLocation(config);
|
|
219
220
|
}
|
|
220
221
|
|
|
222
|
+
config = withPodfileProperties(config, (config) => {
|
|
223
|
+
if (motionUsagePermission === false) {
|
|
224
|
+
config.modResults['expo.location.motionActivityEnabled'] = 'false';
|
|
225
|
+
} else {
|
|
226
|
+
delete config.modResults['expo.location.motionActivityEnabled'];
|
|
227
|
+
}
|
|
228
|
+
return config;
|
|
229
|
+
});
|
|
230
|
+
|
|
221
231
|
config = withForegroundServiceIcon(config, { icon: androidForegroundServiceIcon ?? null });
|
|
222
232
|
|
|
223
233
|
IOSConfig.Permissions.createPermissionsPlugin({
|
package/spm.config.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0b3e67831abe6e8cdc2bc05948ebfdb1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1eb6bb5a7e08052fc1592a5bbc95cf9be1d04191
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9fa209f6849059ed0657fac95688f5e4a09fcd607a73f8d4a4b338334e42ca3f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
27c1a55a8057084b5926b7d3063c28ad14231779c731bae720f9588297cd33b3f7e1be4ca4e77a9457185a20386b177729a08bb3b10400b4397bdbb3009d62de
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b6120740ffabdcf5b629bf118aabfe9f
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
94a063bdd656e7eb1a0fe1ea37fe96b38c7a6a7c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5a41ce83a8d47cb5475e1b1f03f14f1658d8f0d2514b724c1a8d605070a0d3b5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
67bc4a1510637906c5e4bd1d95b7718a943392d51c8b6cc32ed5f3d443d32a098aebc6fce5deae736f28d1cbebffaf783833a3b59df6f347b046270fdc5b928d
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|