expo-location 58.0.12 → 58.0.13
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 +11 -0
- package/android/build.gradle +2 -2
- package/build/Location.types.d.ts +4 -1
- package/build/Location.types.js.map +1 -1
- package/build/next/Location.d.ts +1 -0
- package/build/next/Location.js +3 -0
- package/build/next/Location.js.map +1 -0
- package/build/next/index.d.ts +3 -0
- package/build/next/index.js +5 -0
- package/build/next/index.js.map +1 -0
- package/build/next/js/LocationProvider.d.ts +9 -0
- package/build/next/js/LocationProvider.js +20 -0
- package/build/next/js/LocationProvider.js.map +1 -0
- package/build/next/js/LocationUpdatesHandle.d.ts +15 -0
- package/build/next/js/LocationUpdatesHandle.js +39 -0
- package/build/next/js/LocationUpdatesHandle.js.map +1 -0
- package/build/next/js/Permissions.d.ts +7 -0
- package/build/next/js/Permissions.js +24 -0
- package/build/next/js/Permissions.js.map +1 -0
- package/build/next/js/PositionWatchHandle.d.ts +16 -0
- package/build/next/js/PositionWatchHandle.js +50 -0
- package/build/next/js/PositionWatchHandle.js.map +1 -0
- package/build/next/js/getPosition.d.ts +2 -0
- package/build/next/js/getPosition.js +6 -0
- package/build/next/js/getPosition.js.map +1 -0
- package/build/next/js/index.d.ts +6 -0
- package/build/next/js/index.js +8 -0
- package/build/next/js/index.js.map +1 -0
- package/build/next/js/locationServices.d.ts +3 -0
- package/build/next/js/locationServices.js +35 -0
- package/build/next/js/locationServices.js.map +1 -0
- package/build/next/native/NativeLocationModuleNext.d.ts +5 -0
- package/build/next/native/NativeLocationModuleNext.js +7 -0
- package/build/next/native/NativeLocationModuleNext.js.map +1 -0
- package/build/next/native/index.d.ts +5 -0
- package/build/next/native/index.js +3 -0
- package/build/next/native/index.js.map +1 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.d.ts +21 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.js +3 -0
- package/build/next/native/types/NativeLocationModuleNextClass.types.js.map +1 -0
- package/build/next/native/types/NativeLocationProviderClass.types.d.ts +8 -0
- package/build/next/native/types/NativeLocationProviderClass.types.js +3 -0
- package/build/next/native/types/NativeLocationProviderClass.types.js.map +1 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.d.ts +8 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.js +3 -0
- package/build/next/native/types/NativeLocationUpdatesHandleClass.types.js.map +1 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.d.ts +12 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.js +3 -0
- package/build/next/native/types/NativePositionWatchHandleClass.types.js.map +1 -0
- package/build/next/types/LocationProvider.types.d.ts +1 -0
- package/build/next/types/LocationProvider.types.js +3 -0
- package/build/next/types/LocationProvider.types.js.map +1 -0
- package/build/next/types/Permissions.types.d.ts +22 -0
- package/build/next/types/Permissions.types.js +19 -0
- package/build/next/types/Permissions.types.js.map +1 -0
- package/build/next/types/Position.types.d.ts +55 -0
- package/build/next/types/Position.types.js +11 -0
- package/build/next/types/Position.types.js.map +1 -0
- package/build/next/types/index.d.ts +3 -0
- package/build/next/types/index.js +5 -0
- package/build/next/types/index.js.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/EXLocation.m +1 -0
- package/ios/ExpoLocation.podspec +9 -0
- package/ios/LocationUtils.swift +3 -1
- package/ios/next/LocationModuleNext.swift +110 -0
- package/ios/next/LocationNextExceptions.swift +118 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesHandle.swift +52 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesTaskConsumer.swift +40 -0
- package/ios/next/LocationUpdatesHandle/LocationUpdatesTaskOptions.swift +19 -0
- package/ios/next/LocationUpdatesHandle/SignificantLocationChangeMonitor.swift +20 -0
- package/ios/next/Permissions/BackgroundPermissionsRequester.swift +34 -0
- package/ios/next/Permissions/CLLocationManager+MainThread.swift +10 -0
- package/ios/next/Permissions/ForegroundPermissionsRequester.swift +38 -0
- package/ios/next/Permissions/LocationAccessGuard.swift +21 -0
- package/ios/next/Permissions/LocationAccuracyAuthorization.swift +9 -0
- package/ios/next/Permissions/LocationAccuracyOption.swift +6 -0
- package/ios/next/Permissions/LocationAuthorizationScope.swift +16 -0
- package/ios/next/Permissions/LocationManagerAlwaysAuthorizationRequest.swift +109 -0
- package/ios/next/Permissions/LocationPermissionKind.swift +26 -0
- package/ios/next/Permissions/LocationPermissionResponse.swift +51 -0
- package/ios/next/Permissions/LocationPermissionsDelegate.swift +85 -0
- package/ios/next/Permissions/LocationPermissionsRequester.swift +96 -0
- package/ios/next/Permissions/LocationPlistKeys.swift +10 -0
- package/ios/next/Permissions/PermissionsRequestOptions.swift +5 -0
- package/ios/next/Permissions/TemporaryFullAccuracyPlistKeys.swift +13 -0
- package/ios/next/Permissions/TemporaryFullAccuracyRequester.swift +28 -0
- package/ios/next/Position/Coordinates.swift +7 -0
- package/ios/next/Position/GetPositionOptions.swift +7 -0
- package/ios/next/Position/LocationUpdateDiagnostics.swift +41 -0
- package/ios/next/Position/Position.swift +43 -0
- package/ios/next/Position/PositionRequester.swift +55 -0
- package/ios/next/Position/PositionUpdatesCompatibilitySource.swift +43 -0
- package/ios/next/Position/PositionUpdatesLiveSource.swift +46 -0
- package/ios/next/Position/PositionUpdatesSource.swift +40 -0
- package/ios/next/Position/PositionUpdatesSubscription.swift +85 -0
- package/ios/next/PositionWatcher/PositionWatchStatus.swift +9 -0
- package/ios/next/PositionWatcher/PositionWatcher.swift +143 -0
- package/ios/next/Profile.swift +60 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.module → 58.0.13/expo.modules.location-58.0.13.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.pom → 58.0.13/expo.modules.location-58.0.13.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.13/expo.modules.location-58.0.13.pom.sha512 +1 -0
- package/package.json +32 -3
- package/plugin/build/withLocation.d.ts +18 -0
- package/plugin/build/withLocation.js +28 -1
- package/plugin/build/withLocation.js.map +1 -1
- package/plugin/src/withLocation.ts +52 -0
- package/src/Location.types.ts +4 -1
- package/src/next/Location.ts +12 -0
- package/src/next/index.ts +28 -0
- package/src/next/js/LocationProvider.ts +28 -0
- package/src/next/js/LocationUpdatesHandle.ts +60 -0
- package/src/next/js/Permissions.ts +34 -0
- package/src/next/js/PositionWatchHandle.ts +75 -0
- package/src/next/js/getPosition.ts +6 -0
- package/src/next/js/index.ts +21 -0
- package/src/next/js/locationServices.ts +38 -0
- package/src/next/native/NativeLocationModuleNext.ts +9 -0
- package/src/next/native/index.ts +10 -0
- package/src/next/native/types/NativeLocationModuleNextClass.types.ts +34 -0
- package/src/next/native/types/NativeLocationProviderClass.types.ts +12 -0
- package/src/next/native/types/NativeLocationUpdatesHandleClass.types.ts +9 -0
- package/src/next/native/types/NativePositionWatchHandleClass.types.ts +14 -0
- package/src/next/types/LocationProvider.types.ts +1 -0
- package/src/next/types/Permissions.types.ts +27 -0
- package/src/next/types/Position.types.ts +58 -0
- package/src/next/types/index.ts +3 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.location/58.0.12/expo.modules.location-58.0.12.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar → 58.0.13/expo.modules.location-58.0.13-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.md5 → 58.0.13/expo.modules.location-58.0.13-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha1 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha256 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12-sources.jar.sha512 → 58.0.13/expo.modules.location-58.0.13-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar → 58.0.13/expo.modules.location-58.0.13.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.md5 → 58.0.13/expo.modules.location-58.0.13.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha1 → 58.0.13/expo.modules.location-58.0.13.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha256 → 58.0.13/expo.modules.location-58.0.13.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.location/{58.0.12/expo.modules.location-58.0.12.aar.sha512 → 58.0.13/expo.modules.location-58.0.13.aar.sha512} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import CoreLocation
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
final class PositionUpdatesSource {
|
|
5
|
+
let stream: AsyncThrowingStream<CLLocation?, Error>
|
|
6
|
+
private let continuation: AsyncThrowingStream<CLLocation?, Error>.Continuation
|
|
7
|
+
|
|
8
|
+
init(
|
|
9
|
+
stream: AsyncThrowingStream<CLLocation?, Error>,
|
|
10
|
+
continuation: AsyncThrowingStream<CLLocation?, Error>.Continuation,
|
|
11
|
+
stop: @escaping () -> Void
|
|
12
|
+
) {
|
|
13
|
+
self.stream = stream
|
|
14
|
+
self.continuation = continuation
|
|
15
|
+
continuation.onTermination = { _ in
|
|
16
|
+
stop()
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
func stop() {
|
|
21
|
+
continuation.finish()
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
extension PositionUpdatesSource {
|
|
26
|
+
static func foreground(for profile: Profile) -> PositionUpdatesSource {
|
|
27
|
+
return updates(for: profile, allowsBackgroundUpdates: false)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static func background(for profile: Profile) -> PositionUpdatesSource {
|
|
31
|
+
return updates(for: profile, allowsBackgroundUpdates: true)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private static func updates(for profile: Profile, allowsBackgroundUpdates: Bool) -> PositionUpdatesSource {
|
|
35
|
+
if profile != .lowPower, #available(iOS 17.0, *) {
|
|
36
|
+
return PositionUpdatesLiveSource().updates(for: profile, allowsBackgroundUpdates: allowsBackgroundUpdates)
|
|
37
|
+
}
|
|
38
|
+
return PositionUpdatesCompatibilitySource().updates(for: profile, allowsBackgroundUpdates: allowsBackgroundUpdates)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import CoreLocation
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
final class PositionUpdatesSubscription {
|
|
5
|
+
private let source: PositionUpdatesSource
|
|
6
|
+
private let interval: TimeInterval
|
|
7
|
+
private let onLocation: (CLLocation) -> Void
|
|
8
|
+
private let onError: (Error) -> Void
|
|
9
|
+
private let lock = NSRecursiveLock()
|
|
10
|
+
private var lastEmittedAt: Date?
|
|
11
|
+
private var active = true
|
|
12
|
+
|
|
13
|
+
init(
|
|
14
|
+
source: PositionUpdatesSource,
|
|
15
|
+
interval: TimeInterval = 0,
|
|
16
|
+
onLocation: @escaping (CLLocation) -> Void,
|
|
17
|
+
onError: @escaping (Error) -> Void
|
|
18
|
+
) {
|
|
19
|
+
self.source = source
|
|
20
|
+
self.interval = interval
|
|
21
|
+
self.onLocation = onLocation
|
|
22
|
+
self.onError = onError
|
|
23
|
+
Task { @MainActor [weak self] in
|
|
24
|
+
do {
|
|
25
|
+
for try await location in source.stream {
|
|
26
|
+
guard let self, self.deliver(location) else {
|
|
27
|
+
break
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
} catch {
|
|
31
|
+
self?.fail(error)
|
|
32
|
+
}
|
|
33
|
+
self?.finish()
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var isActive: Bool {
|
|
38
|
+
lock.withLock {
|
|
39
|
+
active
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
func stop() {
|
|
44
|
+
lock.withLock {
|
|
45
|
+
active = false
|
|
46
|
+
}
|
|
47
|
+
source.stop()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private func deliver(_ location: CLLocation?) -> Bool {
|
|
51
|
+
lock.withLock {
|
|
52
|
+
guard active else {
|
|
53
|
+
return false
|
|
54
|
+
}
|
|
55
|
+
guard let location else {
|
|
56
|
+
return true
|
|
57
|
+
}
|
|
58
|
+
if let lastEmittedAt, location.timestamp.timeIntervalSince(lastEmittedAt) < interval {
|
|
59
|
+
return true
|
|
60
|
+
}
|
|
61
|
+
lastEmittedAt = location.timestamp
|
|
62
|
+
onLocation(location)
|
|
63
|
+
return true
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private func fail(_ error: Error) {
|
|
68
|
+
lock.withLock {
|
|
69
|
+
guard active else {
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
onError(error)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private func finish() {
|
|
77
|
+
lock.withLock {
|
|
78
|
+
active = false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
deinit {
|
|
83
|
+
stop()
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import CoreLocation
|
|
2
|
+
import ExpoModulesCore
|
|
3
|
+
|
|
4
|
+
final class PositionWatcher: SharedObject {
|
|
5
|
+
static let positionChangedEvent = "positionChanged"
|
|
6
|
+
static var isAppInForeground = true
|
|
7
|
+
|
|
8
|
+
var makeSource: (_ profile: Profile) -> PositionUpdatesSource = PositionUpdatesSource.foreground
|
|
9
|
+
|
|
10
|
+
lazy var send: (_ payload: [String: Any]) -> Void = { [weak self] payload in
|
|
11
|
+
self?.emit(event: Self.positionChangedEvent, payload: payload)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
private var activeProfile: Profile
|
|
15
|
+
private var stagedProfile: Profile
|
|
16
|
+
private var activeInterval: TimeInterval = 0
|
|
17
|
+
private var stagedInterval: TimeInterval = 0
|
|
18
|
+
private let lock = NSRecursiveLock()
|
|
19
|
+
private var subscription: PositionUpdatesSubscription?
|
|
20
|
+
private var isStarted = false
|
|
21
|
+
private var isPaused = false
|
|
22
|
+
private var isReleased = false
|
|
23
|
+
|
|
24
|
+
init(profile: Profile) {
|
|
25
|
+
self.activeProfile = profile
|
|
26
|
+
self.stagedProfile = profile
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var isSubscribed: Bool {
|
|
30
|
+
lock.withLock {
|
|
31
|
+
subscription?.isActive == true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
func start() {
|
|
36
|
+
lock.withLock {
|
|
37
|
+
isStarted = true
|
|
38
|
+
reconcile()
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
func pause() {
|
|
43
|
+
lock.withLock {
|
|
44
|
+
isPaused = true
|
|
45
|
+
reconcile()
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
func resume() -> Bool {
|
|
50
|
+
lock.withLock {
|
|
51
|
+
isPaused = false
|
|
52
|
+
reconcile()
|
|
53
|
+
return isSubscribed
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
func withProfile(_ profile: Profile) {
|
|
58
|
+
lock.withLock {
|
|
59
|
+
stagedProfile = profile
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
func withInterval(_ seconds: TimeInterval) throws {
|
|
64
|
+
guard seconds >= 0, seconds.isFinite else {
|
|
65
|
+
throw InvalidWatchIntervalException()
|
|
66
|
+
}
|
|
67
|
+
lock.withLock {
|
|
68
|
+
stagedInterval = seconds
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func restart() -> Bool {
|
|
73
|
+
lock.withLock {
|
|
74
|
+
if stagedProfile != activeProfile || stagedInterval != activeInterval {
|
|
75
|
+
activeProfile = stagedProfile
|
|
76
|
+
activeInterval = stagedInterval
|
|
77
|
+
stopStreaming()
|
|
78
|
+
}
|
|
79
|
+
reconcile()
|
|
80
|
+
return isSubscribed
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
func status() -> PositionWatchStatus {
|
|
85
|
+
lock.withLock {
|
|
86
|
+
let status = PositionWatchStatus()
|
|
87
|
+
status.isSubscribed = isSubscribed
|
|
88
|
+
status.isHandleAlive = !isReleased
|
|
89
|
+
status.isStarted = isStarted
|
|
90
|
+
status.isPaused = isPaused
|
|
91
|
+
status.isInForeground = Self.isAppInForeground
|
|
92
|
+
return status
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
override func sharedObjectWillRelease() {
|
|
97
|
+
lock.withLock {
|
|
98
|
+
isReleased = true
|
|
99
|
+
reconcile()
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static func positionPayload(_ location: CLLocation) -> [String: Any] {
|
|
104
|
+
return ["data": location.toPosition().toEventPayload()]
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static func errorPayload(_ error: Error) -> [String: Any] {
|
|
108
|
+
let exception = (error as? Exception) ?? UnexpectedException(error)
|
|
109
|
+
return ["error": ["code": exception.code, "message": exception.reason]]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private func reconcile() {
|
|
113
|
+
let shouldStream = isStarted && !isPaused && !isReleased
|
|
114
|
+
if shouldStream && !isSubscribed {
|
|
115
|
+
startStreaming()
|
|
116
|
+
}
|
|
117
|
+
if !shouldStream {
|
|
118
|
+
stopStreaming()
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
private func startStreaming() {
|
|
123
|
+
subscription = PositionUpdatesSubscription(
|
|
124
|
+
source: makeSource(activeProfile),
|
|
125
|
+
interval: activeInterval,
|
|
126
|
+
onLocation: { [weak self] location in
|
|
127
|
+
self?.send(Self.positionPayload(location))
|
|
128
|
+
},
|
|
129
|
+
onError: { [weak self] error in
|
|
130
|
+
self?.send(Self.errorPayload(error))
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private func stopStreaming() {
|
|
136
|
+
subscription?.stop()
|
|
137
|
+
subscription = nil
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
deinit {
|
|
141
|
+
stopStreaming()
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import CoreLocation
|
|
3
|
+
|
|
4
|
+
enum Profile: String, Enumerable {
|
|
5
|
+
case `default`
|
|
6
|
+
case automotiveNavigation
|
|
7
|
+
case otherNavigation
|
|
8
|
+
case fitness
|
|
9
|
+
case airborne
|
|
10
|
+
case lowPower
|
|
11
|
+
|
|
12
|
+
@available(iOS 17.0, *)
|
|
13
|
+
func clLocationUpdateProfile() -> CLLocationUpdate.LiveConfiguration {
|
|
14
|
+
switch self {
|
|
15
|
+
case .`default`, .lowPower:
|
|
16
|
+
return .default
|
|
17
|
+
case .automotiveNavigation:
|
|
18
|
+
return .automotiveNavigation
|
|
19
|
+
case .otherNavigation:
|
|
20
|
+
return .otherNavigation
|
|
21
|
+
case .fitness:
|
|
22
|
+
return .fitness
|
|
23
|
+
case .airborne:
|
|
24
|
+
return .airborne
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
func clDistanceFilter() -> CLLocationDistance {
|
|
29
|
+
switch self {
|
|
30
|
+
case .lowPower:
|
|
31
|
+
return 3000
|
|
32
|
+
case .`default`, .automotiveNavigation, .otherNavigation, .fitness, .airborne:
|
|
33
|
+
return kCLDistanceFilterNone
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
func clDesiredAccuracy() -> CLLocationAccuracy {
|
|
38
|
+
switch self {
|
|
39
|
+
case .lowPower:
|
|
40
|
+
return kCLLocationAccuracyKilometer
|
|
41
|
+
case .`default`, .automotiveNavigation, .otherNavigation, .fitness, .airborne:
|
|
42
|
+
return kCLLocationAccuracyBest
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
func clActivityType() -> CLActivityType {
|
|
47
|
+
switch self {
|
|
48
|
+
case .`default`, .lowPower:
|
|
49
|
+
return .other
|
|
50
|
+
case .automotiveNavigation:
|
|
51
|
+
return .automotiveNavigation
|
|
52
|
+
case .otherNavigation:
|
|
53
|
+
return .otherNavigation
|
|
54
|
+
case .fitness:
|
|
55
|
+
return .fitness
|
|
56
|
+
case .airborne:
|
|
57
|
+
return .airborne
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -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.13",
|
|
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.13.aar",
|
|
37
|
+
"url": "expo.modules.location-58.0.13.aar",
|
|
38
38
|
"size": 450277,
|
|
39
39
|
"sha512": "1d52e7849fe29a33c686fca271fd5b2696ebbb050617ee2d081e3aeae4c4c4a0826fb6b4b8eef4c790ad72aa5d49701cc96c92caacec3e484a3a4930dc45a5c8",
|
|
40
40
|
"sha256": "30515d0f37957d667880e577c9bc247dfd4e84c9058574413e850893e83c3406",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
],
|
|
91
91
|
"files": [
|
|
92
92
|
{
|
|
93
|
-
"name": "expo.modules.location-58.0.
|
|
94
|
-
"url": "expo.modules.location-58.0.
|
|
93
|
+
"name": "expo.modules.location-58.0.13.aar",
|
|
94
|
+
"url": "expo.modules.location-58.0.13.aar",
|
|
95
95
|
"size": 450277,
|
|
96
96
|
"sha512": "1d52e7849fe29a33c686fca271fd5b2696ebbb050617ee2d081e3aeae4c4c4a0826fb6b4b8eef4c790ad72aa5d49701cc96c92caacec3e484a3a4930dc45a5c8",
|
|
97
97
|
"sha256": "30515d0f37957d667880e577c9bc247dfd4e84c9058574413e850893e83c3406",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
},
|
|
111
111
|
"files": [
|
|
112
112
|
{
|
|
113
|
-
"name": "expo.modules.location-58.0.
|
|
114
|
-
"url": "expo.modules.location-58.0.
|
|
113
|
+
"name": "expo.modules.location-58.0.13-sources.jar",
|
|
114
|
+
"url": "expo.modules.location-58.0.13-sources.jar",
|
|
115
115
|
"size": 39982,
|
|
116
116
|
"sha512": "a0bb6a2c55e0c88b6c92553b3a5b05b5b24c604ade8388a46fd758221a2a8b4fb5f2ffb2ad7f3977794932f541aff21f9a5be896510654a963137bbd00ca11e4",
|
|
117
117
|
"sha256": "36352dc221d755d69fb9a847a78836e1e359ad0443743aaa7f5f2648ddf76f87",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
585f591b8edc00660c56ea8256a9664f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
593547bde190365701ba329c2e4b8a10205da018
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
79b0154c9db5c0d476f7225b33ac7c40a0c7661f356cd16870f4a216ff2a693f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f7fb35c26e35b5c187829d84abc71228ec8bbefa08ece125cd4feb7a4961edbeca6e8789df4848c74751303a46b33ba8b11e034ca1a5880d5bad7f35e712dde5
|
|
@@ -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.13</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
|
+
35cc85505e7dfd6d984fca92c612b609
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b170440ec0fba727b6ebe34501aa3aa5d8bba924
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9c7add2e11db5f0b33aca67f7f623c58d7863272f8ad5595a42bd2fef831917e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
353c6484d0224b8655cd47f7b0be7d9efd3e1ff9d8873532d7a2a5f8d565e2cf532e446d3a77836a213455b509448a1f6bfde10fa852a1e2fbcbe684d4f7e170
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-location",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.13",
|
|
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",
|
|
@@ -26,21 +26,50 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"main": "build/index.js",
|
|
28
28
|
"types": "build/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./app.plugin": "./app.plugin.js",
|
|
31
|
+
"./app.plugin.js": "./app.plugin.js",
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
"./plugin": "./plugin/build/index.js",
|
|
34
|
+
".": {
|
|
35
|
+
"types": {
|
|
36
|
+
"expo-source": "./src/index.ts",
|
|
37
|
+
"default": "./build/index.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"expo-source": "./src/index.ts",
|
|
40
|
+
"default": "./build/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./next": {
|
|
43
|
+
"types": {
|
|
44
|
+
"expo-source": "./src/next/index.ts",
|
|
45
|
+
"default": "./build/next/index.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"expo-source": "./src/next/index.ts",
|
|
48
|
+
"default": "./build/next/index.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
29
51
|
"dependencies": {
|
|
30
52
|
"@expo/image-utils": "^0.12.4"
|
|
31
53
|
},
|
|
32
54
|
"devDependencies": {
|
|
55
|
+
"@expo/internal-scripts": "58.0.1",
|
|
33
56
|
"@types/jest": "^30.0.0",
|
|
34
57
|
"@types/node": "^22.14.0",
|
|
35
58
|
"@types/react": "~19.3.0",
|
|
36
|
-
"expo": "58.0.
|
|
37
|
-
"expo-
|
|
59
|
+
"expo": "58.0.7",
|
|
60
|
+
"expo-task-manager": "~58.0.11"
|
|
38
61
|
},
|
|
39
62
|
"peerDependencies": {
|
|
40
63
|
"expo": "*",
|
|
64
|
+
"expo-task-manager": "*",
|
|
41
65
|
"react": "*",
|
|
42
66
|
"react-native": "*"
|
|
43
67
|
},
|
|
68
|
+
"peerDependenciesMeta": {
|
|
69
|
+
"expo-task-manager": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
44
73
|
"scripts": {
|
|
45
74
|
"precompile-ios": "et prebuild-package-for-publish",
|
|
46
75
|
"precompile-android": "et prebuild-android-package-for-publish",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
+
export declare const FULL_ACCURACY_PURPOSE_KEY = "ExpoLocationFullAccuracy";
|
|
2
3
|
type DPIString = 'mdpi' | 'hdpi' | 'xhdpi' | 'xxhdpi' | 'xxxhdpi';
|
|
3
4
|
type dpiMap = Record<DPIString, {
|
|
4
5
|
folderName: string;
|
|
@@ -45,6 +46,23 @@ export type Props = {
|
|
|
45
46
|
* @platform ios
|
|
46
47
|
*/
|
|
47
48
|
motionUsagePermission?: string | false;
|
|
49
|
+
/**
|
|
50
|
+
* A string to set the message the system shows when a permission request from
|
|
51
|
+
* `expo-location/next` asks to raise a reduced accuracy authorization to full accuracy. It is written under the
|
|
52
|
+
* `ExpoLocationFullAccuracy` key of `NSLocationTemporaryUsageDescriptionDictionary`.
|
|
53
|
+
* Pass `false` to omit the key, which skips the raise.
|
|
54
|
+
* @default "Allow $(PRODUCT_NAME) to access your precise location"
|
|
55
|
+
* @platform ios
|
|
56
|
+
*/
|
|
57
|
+
locationFullAccuracyPermission?: string | false;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the permission prompt offers reduced accuracy by default, by setting
|
|
60
|
+
* `NSLocationDefaultAccuracyReduced` in `Info.plist`. The app can still ask for full accuracy
|
|
61
|
+
* for a session with `accuracy: 'full'` in a permission request from `expo-location/next`.
|
|
62
|
+
* @default false
|
|
63
|
+
* @platform ios
|
|
64
|
+
*/
|
|
65
|
+
isIosReducedAccuracyByDefault?: boolean;
|
|
48
66
|
/**
|
|
49
67
|
* Whether to enable location in `UIBackgroundModes`.
|
|
50
68
|
* @default false
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
ANDROID_RES_PATH: null,
|
|
7
7
|
FOREGROUND_SERVICE_ICON: null,
|
|
8
8
|
FOREGROUND_SERVICE_ICON_RESOURCE: null,
|
|
9
|
+
FULL_ACCURACY_PURPOSE_KEY: null,
|
|
9
10
|
META_DATA_FOREGROUND_SERVICE_ICON: null,
|
|
10
11
|
default: null,
|
|
11
12
|
dpiValues: null,
|
|
@@ -28,6 +29,9 @@ _export(exports, {
|
|
|
28
29
|
get FOREGROUND_SERVICE_ICON_RESOURCE () {
|
|
29
30
|
return FOREGROUND_SERVICE_ICON_RESOURCE;
|
|
30
31
|
},
|
|
32
|
+
get FULL_ACCURACY_PURPOSE_KEY () {
|
|
33
|
+
return FULL_ACCURACY_PURPOSE_KEY;
|
|
34
|
+
},
|
|
31
35
|
get META_DATA_FOREGROUND_SERVICE_ICON () {
|
|
32
36
|
return META_DATA_FOREGROUND_SERVICE_ICON;
|
|
33
37
|
},
|
|
@@ -75,6 +79,8 @@ function _path() {
|
|
|
75
79
|
const pkg = require('../../package.json');
|
|
76
80
|
const LOCATION_USAGE = 'Allow $(PRODUCT_NAME) to access your location';
|
|
77
81
|
const MOTION_USAGE = 'Allow $(PRODUCT_NAME) to detect your current motion activity';
|
|
82
|
+
const FULL_ACCURACY_USAGE = 'Allow $(PRODUCT_NAME) to access your precise location';
|
|
83
|
+
const FULL_ACCURACY_PURPOSE_KEY = 'ExpoLocationFullAccuracy';
|
|
78
84
|
const ANDROID_RES_PATH = 'android/app/src/main/res/';
|
|
79
85
|
const dpiValues = {
|
|
80
86
|
mdpi: {
|
|
@@ -181,7 +187,22 @@ function removeForegroundServiceIconImageFiles(projectRoot) {
|
|
|
181
187
|
}
|
|
182
188
|
});
|
|
183
189
|
}
|
|
184
|
-
const
|
|
190
|
+
const withTemporaryFullAccuracy = (config, message)=>{
|
|
191
|
+
return (0, _configplugins().withInfoPlist)(config, (config)=>{
|
|
192
|
+
config.modResults.NSLocationTemporaryUsageDescriptionDictionary = {
|
|
193
|
+
...config.modResults.NSLocationTemporaryUsageDescriptionDictionary,
|
|
194
|
+
[FULL_ACCURACY_PURPOSE_KEY]: message
|
|
195
|
+
};
|
|
196
|
+
return config;
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
const withReducedAccuracyDefault = (config)=>{
|
|
200
|
+
return (0, _configplugins().withInfoPlist)(config, (config)=>{
|
|
201
|
+
config.modResults.NSLocationDefaultAccuracyReduced = true;
|
|
202
|
+
return config;
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
const withLocation = (config, { locationAlwaysAndWhenInUsePermission, locationAlwaysPermission, locationWhenInUsePermission, motionUsagePermission, locationFullAccuracyPermission, isIosReducedAccuracyByDefault, isIosBackgroundLocationEnabled, isAndroidBackgroundLocationEnabled, isAndroidForegroundServiceEnabled, isAndroidMotionActivityEnabled, androidForegroundServiceIcon } = {})=>{
|
|
185
206
|
if (isIosBackgroundLocationEnabled) {
|
|
186
207
|
config = withBackgroundLocation(config);
|
|
187
208
|
}
|
|
@@ -193,6 +214,12 @@ const withLocation = (config, { locationAlwaysAndWhenInUsePermission, locationAl
|
|
|
193
214
|
}
|
|
194
215
|
return config;
|
|
195
216
|
});
|
|
217
|
+
if (locationFullAccuracyPermission !== false) {
|
|
218
|
+
config = withTemporaryFullAccuracy(config, locationFullAccuracyPermission || FULL_ACCURACY_USAGE);
|
|
219
|
+
}
|
|
220
|
+
if (isIosReducedAccuracyByDefault) {
|
|
221
|
+
config = withReducedAccuracyDefault(config);
|
|
222
|
+
}
|
|
196
223
|
config = withForegroundServiceIcon(config, {
|
|
197
224
|
icon: androidForegroundServiceIcon ?? null
|
|
198
225
|
});
|
|
@@ -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","withPodfileProperties","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","FULL_ACCURACY_PURPOSE_KEY","META_DATA_FOREGROUND_SERVICE_ICON","dpiValues","setForegroundServiceIconAsync","withForegroundServiceIcon","pkg","require","LOCATION_USAGE","MOTION_USAGE","FULL_ACCURACY_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","withTemporaryFullAccuracy","message","NSLocationTemporaryUsageDescriptionDictionary","withReducedAccuracyDefault","NSLocationDefaultAccuracyReduced","withLocation","locationAlwaysAndWhenInUsePermission","locationAlwaysPermission","locationWhenInUsePermission","motionUsagePermission","locationFullAccuracyPermission","isIosReducedAccuracyByDefault","isIosBackgroundLocationEnabled","isAndroidBackgroundLocationEnabled","isAndroidForegroundServiceEnabled","isAndroidMotionActivityEnabled","androidForegroundServiceIcon","withPodfileProperties","IOSConfig","Permissions","createPermissionsPlugin","NSLocationAlwaysAndWhenInUseUsageDescription","NSLocationAlwaysUsageDescription","NSLocationWhenInUseUsageDescription","NSMotionUsageDescription","enableAndroidForegroundService","withPermissions","filter","Boolean","createRunOncePlugin","name","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;QAwBaA;eAAAA;;QAgBAC;eAAAA;;QACAC;eAAAA;;QAtBAC;eAAAA;;QAuBAC;eAAAA;;QAuRb;eAAA;;QAxSaC;eAAAA;;QAoESC;eAAAA;;QArCTC;eAAAA;;;;yBAxDsB;;;;;;;yBAU5B;;;;;;;yBAC0D;;;;;;;yBACzC;;;;;;AAExB,MAAMC,MAAMC,QAAQ;AACpB,MAAMC,iBAAiB;AACvB,MAAMC,eAAe;AACrB,MAAMC,sBAAsB;AAErB,MAAMT,4BAA4B;AAKlC,MAAMH,mBAAmB;AACzB,MAAMK,YAAoB;IAC/BQ,MAAM;QAAEC,YAAY;QAAeC,OAAO;IAAE;IAC5CC,MAAM;QAAEF,YAAY;QAAeC,OAAO;IAAI;IAC9CE,OAAO;QAAEH,YAAY;QAAgBC,OAAO;IAAE;IAC9CG,QAAQ;QAAEJ,YAAY;QAAiBC,OAAO;IAAE;IAChDI,SAAS;QAAEL,YAAY;QAAkBC,OAAO;IAAE;AACpD;AACA,MAAM,EACJK,gCAAgC,EAChCC,yBAAyB,EACzBC,qCAAqC,EACtC,GAAGC,8BAAa,CAACC,QAAQ;AAC1B,MAAMC,sBAAsB;AAC5B,MAAMC,mBAAmB;AAElB,MAAMzB,0BAA0B;AAChC,MAAMC,mCAAmC,CAAC,UAAU,EAAED,yBAAyB;AAC/E,MAAMG,oCAAoC;AAEjD,MAAMuB,yBAAuC,C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