react-native-bg-geolocation 0.2.0
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/BgGeolocation.podspec +39 -0
- package/LICENSE +20 -0
- package/README.md +366 -0
- package/android/build.gradle +69 -0
- package/android/src/main/AndroidManifest.xml +53 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationActivityRecognitionReceiver.kt +116 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationBootReceiver.kt +44 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationForegroundService.kt +373 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationGeofenceReceiver.kt +55 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationHeadlessTask.kt +138 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationModule.kt +1030 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationMotionStateMachine.kt +159 -0
- package/android/src/main/java/com/bggeolocation/BgGeolocationPackage.kt +31 -0
- package/android/src/main/res/drawable/bg_geo_notification.xml +9 -0
- package/ios/BgGeolocation.h +14 -0
- package/ios/BgGeolocation.mm +709 -0
- package/ios/engine/AtomicBoolean.swift +48 -0
- package/ios/engine/BGActivityChangeEvent.swift +20 -0
- package/ios/engine/BGActivityConfig.swift +71 -0
- package/ios/engine/BGAppConfig.swift +92 -0
- package/ios/engine/BGAppState.swift +147 -0
- package/ios/engine/BGAuthorization.swift +85 -0
- package/ios/engine/BGAuthorizationAlertPresenter.swift +39 -0
- package/ios/engine/BGAuthorizationConfig.swift +50 -0
- package/ios/engine/BGAuthorizationEvent.swift +40 -0
- package/ios/engine/BGBackgroundTaskManager.swift +143 -0
- package/ios/engine/BGCLRouter.swift +101 -0
- package/ios/engine/BGCallback.swift +19 -0
- package/ios/engine/BGConfig.swift +440 -0
- package/ios/engine/BGConfigModuleBase.swift +180 -0
- package/ios/engine/BGConfigOLD.swift +582 -0
- package/ios/engine/BGConnectivityChangeEvent.swift +15 -0
- package/ios/engine/BGCrashDetector.swift +122 -0
- package/ios/engine/BGCurrentPositionRequest.swift +87 -0
- package/ios/engine/BGDataStore.swift +75 -0
- package/ios/engine/BGDatabase.swift +677 -0
- package/ios/engine/BGDatabasePool.swift +220 -0
- package/ios/engine/BGDatabaseQueue.swift +215 -0
- package/ios/engine/BGDateUtils.swift +26 -0
- package/ios/engine/BGDeviceInfo.swift +54 -0
- package/ios/engine/BGDeviceManager.swift +65 -0
- package/ios/engine/BGEnabledChangeEvent.swift +11 -0
- package/ios/engine/BGEnv.swift +17 -0
- package/ios/engine/BGEventBus.swift +83 -0
- package/ios/engine/BGEventManager.swift +169 -0
- package/ios/engine/BGEventNames.swift +51 -0
- package/ios/engine/BGGeofence.swift +233 -0
- package/ios/engine/BGGeofenceDAO.swift +152 -0
- package/ios/engine/BGGeofenceEvent.swift +42 -0
- package/ios/engine/BGGeofenceLocationRequest.swift +94 -0
- package/ios/engine/BGGeofenceManager.swift +315 -0
- package/ios/engine/BGGeofenceTransition.swift +97 -0
- package/ios/engine/BGGeofencesChangeEvent.swift +26 -0
- package/ios/engine/BGGeolocationConfig.swift +136 -0
- package/ios/engine/BGHeartbeatEvent.swift +31 -0
- package/ios/engine/BGHeartbeatService.swift +51 -0
- package/ios/engine/BGHttpConfig.swift +105 -0
- package/ios/engine/BGHttpErrorCodes.swift +63 -0
- package/ios/engine/BGHttpEvent.swift +34 -0
- package/ios/engine/BGHttpRequest.swift +126 -0
- package/ios/engine/BGHttpResponse.swift +93 -0
- package/ios/engine/BGHttpService.swift +428 -0
- package/ios/engine/BGKalmanFilter.swift +105 -0
- package/ios/engine/BGLMActionNames.swift +55 -0
- package/ios/engine/BGLicenseManager.swift +26 -0
- package/ios/engine/BGLiveActivityManager.swift +327 -0
- package/ios/engine/BGLocation.swift +311 -0
- package/ios/engine/BGLocationAuthorization.swift +427 -0
- package/ios/engine/BGLocationDAO.swift +252 -0
- package/ios/engine/BGLocationErrors.swift +28 -0
- package/ios/engine/BGLocationEvent.swift +43 -0
- package/ios/engine/BGLocationFilter.swift +82 -0
- package/ios/engine/BGLocationFilterConfig.swift +57 -0
- package/ios/engine/BGLocationHelper.swift +54 -0
- package/ios/engine/BGLocationManager.swift +662 -0
- package/ios/engine/BGLocationMetricsEngine.swift +116 -0
- package/ios/engine/BGLocationRequestService.swift +459 -0
- package/ios/engine/BGLocationSatisfier.swift +14 -0
- package/ios/engine/BGLocationStreamEvent.swift +27 -0
- package/ios/engine/BGLog.swift +337 -0
- package/ios/engine/BGLogLevel.swift +26 -0
- package/ios/engine/BGLoggerConfig.swift +60 -0
- package/ios/engine/BGMotionActivity.swift +31 -0
- package/ios/engine/BGMotionActivityClassifier.swift +108 -0
- package/ios/engine/BGMotionActivityManagerAdapter.swift +40 -0
- package/ios/engine/BGMotionActivitySource.swift +46 -0
- package/ios/engine/BGMotionDetector.swift +377 -0
- package/ios/engine/BGMotionPermissionManager.swift +50 -0
- package/ios/engine/BGNativeLogger.swift +48 -0
- package/ios/engine/BGNotificaitons.swift +37 -0
- package/ios/engine/BGOdometer.swift +66 -0
- package/ios/engine/BGPersistenceConfig.swift +29 -0
- package/ios/engine/BGPolygonStreamRequest.swift +48 -0
- package/ios/engine/BGPowerSaveChangeEvent.swift +12 -0
- package/ios/engine/BGPropertySpec.swift +29 -0
- package/ios/engine/BGProviderChangeEvent.swift +31 -0
- package/ios/engine/BGQueue.swift +50 -0
- package/ios/engine/BGRPC.swift +194 -0
- package/ios/engine/BGReachability.swift +58 -0
- package/ios/engine/BGResultSet.swift +157 -0
- package/ios/engine/BGSchedule.swift +228 -0
- package/ios/engine/BGScheduleEvent.swift +13 -0
- package/ios/engine/BGScheduler.swift +116 -0
- package/ios/engine/BGSingleLocationRequest.swift +49 -0
- package/ios/engine/BGStreamLocationRequest.swift +42 -0
- package/ios/engine/BGTemplate.swift +54 -0
- package/ios/engine/BGTimerService.swift +46 -0
- package/ios/engine/BGTrackingAudioManager.swift +286 -0
- package/ios/engine/BGTrackingService.swift +879 -0
- package/ios/engine/BGWatchPositionRequest.swift +63 -0
- package/ios/engine/DatabaseQueue.swift +47 -0
- package/ios/engine/LogQuery.swift +10 -0
- package/ios/engine/SQLQuery.swift +65 -0
- package/ios/engine/TransistorAuthorizationToken.swift +182 -0
- package/ios/liveactivity/BGLiveTrackingAttributes.swift +52 -0
- package/ios/locationpush/BGLocationPushDeliverer.swift +260 -0
- package/ios/locationpush/BGLocationPushService.swift +161 -0
- package/ios/locationpush/BGLocationPushShared.swift +98 -0
- package/ios/locationpush/BGLocationPushSocketClient.swift +198 -0
- package/lib/module/NativeBgGeolocation.js +5 -0
- package/lib/module/NativeBgGeolocation.js.map +1 -0
- package/lib/module/events.js +20 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/index.js +706 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeBgGeolocation.d.ts +57 -0
- package/lib/typescript/src/NativeBgGeolocation.d.ts.map +1 -0
- package/lib/typescript/src/events.d.ts +18 -0
- package/lib/typescript/src/events.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +238 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +229 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +141 -0
- package/src/NativeBgGeolocation.ts +236 -0
- package/src/events.ts +17 -0
- package/src/index.tsx +935 -0
- package/src/types.ts +254 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import CoreMotion
|
|
3
|
+
|
|
4
|
+
@objc public class BGCrashDetector: NSObject {
|
|
5
|
+
|
|
6
|
+
private static var _sharedInstance: BGCrashDetector?
|
|
7
|
+
private static let lock = NSLock()
|
|
8
|
+
|
|
9
|
+
@objc public var motionManager: CMMotionManager?
|
|
10
|
+
|
|
11
|
+
@objc public var accelerometerThresholdHigh: Double = 3.0
|
|
12
|
+
@objc public var accelerometerThresholdLow: Double = 1.0
|
|
13
|
+
@objc public var accelerometerHysteresisDuration: Double = 0.5
|
|
14
|
+
@objc public var accelerometerTimestamp: Double = 0
|
|
15
|
+
@objc public var accelerometerTriggered: Bool = false
|
|
16
|
+
@objc public var accelerometerDidCrash: Bool = false
|
|
17
|
+
|
|
18
|
+
@objc public var gyroscopeThresholdHigh: Double = 10.0
|
|
19
|
+
@objc public var gyroscopeThresholdLow: Double = 2.0
|
|
20
|
+
@objc public var gyroscopeHysteresisDuration: Double = 0.5
|
|
21
|
+
@objc public var gyroscopeTimestamp: Double = 0
|
|
22
|
+
@objc public var gyroscopeTriggered: Bool = false
|
|
23
|
+
@objc public var gyroscopeDidCrash: Bool = false
|
|
24
|
+
|
|
25
|
+
@objc public var magnetometerThresholdHigh: Double = 100.0
|
|
26
|
+
@objc public var magnetometerThresholdLow: Double = 20.0
|
|
27
|
+
@objc public var magnetometerTimestamp: Double = 0
|
|
28
|
+
@objc public var magnetometerTriggered: Bool = false
|
|
29
|
+
@objc public var magnetometerDidCrash: Bool = false
|
|
30
|
+
|
|
31
|
+
@objc public class func sharedInstance() -> BGCrashDetector {
|
|
32
|
+
lock.lock()
|
|
33
|
+
defer { lock.unlock() }
|
|
34
|
+
if _sharedInstance == nil {
|
|
35
|
+
_sharedInstance = BGCrashDetector()
|
|
36
|
+
}
|
|
37
|
+
return _sharedInstance!
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@objc public override init() {
|
|
41
|
+
super.init()
|
|
42
|
+
motionManager = CMMotionManager()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@objc public func start() {
|
|
46
|
+
guard let mgr = motionManager else { return }
|
|
47
|
+
if mgr.isAccelerometerAvailable {
|
|
48
|
+
mgr.accelerometerUpdateInterval = 0.1
|
|
49
|
+
mgr.startAccelerometerUpdates(to: .main) { [weak self] data, _ in
|
|
50
|
+
if let data = data { self?.processAccelerometerData(data) }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if mgr.isGyroAvailable {
|
|
54
|
+
mgr.gyroUpdateInterval = 0.1
|
|
55
|
+
mgr.startGyroUpdates(to: .main) { [weak self] data, _ in
|
|
56
|
+
if let data = data { self?.processGyroscopeData(data) }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if mgr.isMagnetometerAvailable {
|
|
60
|
+
mgr.magnetometerUpdateInterval = 0.1
|
|
61
|
+
mgr.startMagnetometerUpdates(to: .main) { [weak self] data, _ in
|
|
62
|
+
if let data = data { self?.processMagnetometerData(data) }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@objc public func stop() {
|
|
68
|
+
motionManager?.stopAccelerometerUpdates()
|
|
69
|
+
motionManager?.stopGyroUpdates()
|
|
70
|
+
motionManager?.stopMagnetometerUpdates()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@objc public func processAccelerometerData(_ data: CMAccelerometerData) {
|
|
74
|
+
let magnitude = sqrt(data.acceleration.x * data.acceleration.x +
|
|
75
|
+
data.acceleration.y * data.acceleration.y +
|
|
76
|
+
data.acceleration.z * data.acceleration.z)
|
|
77
|
+
if magnitude > accelerometerThresholdHigh {
|
|
78
|
+
accelerometerTimestamp = data.timestamp
|
|
79
|
+
accelerometerTriggered = true
|
|
80
|
+
} else if magnitude < accelerometerThresholdLow && accelerometerTriggered {
|
|
81
|
+
let elapsed = data.timestamp - accelerometerTimestamp
|
|
82
|
+
if elapsed <= accelerometerHysteresisDuration {
|
|
83
|
+
accelerometerDidCrash = true
|
|
84
|
+
handleCrashDetected()
|
|
85
|
+
}
|
|
86
|
+
accelerometerTriggered = false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@objc public func processGyroscopeData(_ data: CMGyroData) {
|
|
91
|
+
let magnitude = sqrt(data.rotationRate.x * data.rotationRate.x +
|
|
92
|
+
data.rotationRate.y * data.rotationRate.y +
|
|
93
|
+
data.rotationRate.z * data.rotationRate.z)
|
|
94
|
+
if magnitude > gyroscopeThresholdHigh {
|
|
95
|
+
gyroscopeTimestamp = data.timestamp
|
|
96
|
+
gyroscopeTriggered = true
|
|
97
|
+
} else if magnitude < gyroscopeThresholdLow && gyroscopeTriggered {
|
|
98
|
+
let elapsed = data.timestamp - gyroscopeTimestamp
|
|
99
|
+
if elapsed <= gyroscopeHysteresisDuration {
|
|
100
|
+
gyroscopeDidCrash = true
|
|
101
|
+
handleCrashDetected()
|
|
102
|
+
}
|
|
103
|
+
gyroscopeTriggered = false
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@objc public func processMagnetometerData(_ data: CMMagnetometerData) {
|
|
108
|
+
let magnitude = sqrt(data.magneticField.x * data.magneticField.x +
|
|
109
|
+
data.magneticField.y * data.magneticField.y +
|
|
110
|
+
data.magneticField.z * data.magneticField.z)
|
|
111
|
+
if magnitude > magnetometerThresholdHigh {
|
|
112
|
+
magnetometerTimestamp = data.timestamp
|
|
113
|
+
magnetometerTriggered = true
|
|
114
|
+
magnetometerDidCrash = true
|
|
115
|
+
handleCrashDetected()
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@objc public func handleCrashDetected() {
|
|
120
|
+
NotificationCenter.default.post(name: NSNotification.Name("BGCrashDetected"), object: self)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import CoreLocation
|
|
3
|
+
|
|
4
|
+
public typealias BGLocationSuccessBlock = (_ location: Any?) -> Void
|
|
5
|
+
public typealias BGLocationFailureBlock = (_ code: Int) -> Void
|
|
6
|
+
|
|
7
|
+
@objc public class BGCurrentPositionRequest: NSObject {
|
|
8
|
+
|
|
9
|
+
@objc public var requestId: String = UUID().uuidString
|
|
10
|
+
@objc public var type: String = "current_position"
|
|
11
|
+
@objc public var maximumAge: Double = 0
|
|
12
|
+
@objc public var timeout: Double = 30
|
|
13
|
+
@objc public var desiredAccuracy: CLLocationAccuracy = kCLLocationAccuracyBest
|
|
14
|
+
@objc public var allowStale: Bool = false
|
|
15
|
+
@objc public var samples: Int = 3
|
|
16
|
+
@objc public var label: String?
|
|
17
|
+
@objc public var persist: Bool = true
|
|
18
|
+
@objc public var extras: [AnyHashable: Any]?
|
|
19
|
+
@objc public var success: BGLocationSuccessBlock?
|
|
20
|
+
@objc public var failure: BGLocationFailureBlock?
|
|
21
|
+
|
|
22
|
+
@objc public class func request(
|
|
23
|
+
success: @escaping BGLocationSuccessBlock,
|
|
24
|
+
failure: @escaping BGLocationFailureBlock
|
|
25
|
+
) -> BGCurrentPositionRequest {
|
|
26
|
+
return BGCurrentPositionRequest(
|
|
27
|
+
type: "current_position",
|
|
28
|
+
maximumAge: 0,
|
|
29
|
+
timeout: 30,
|
|
30
|
+
desiredAccuracy: kCLLocationAccuracyBest,
|
|
31
|
+
allowStale: false,
|
|
32
|
+
samples: 3,
|
|
33
|
+
label: nil,
|
|
34
|
+
persist: true,
|
|
35
|
+
extras: nil,
|
|
36
|
+
success: success,
|
|
37
|
+
failure: failure
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@objc public class func request(
|
|
42
|
+
type: String,
|
|
43
|
+
success: @escaping BGLocationSuccessBlock,
|
|
44
|
+
failure: @escaping BGLocationFailureBlock
|
|
45
|
+
) -> BGCurrentPositionRequest {
|
|
46
|
+
return BGCurrentPositionRequest(
|
|
47
|
+
type: type,
|
|
48
|
+
maximumAge: 0,
|
|
49
|
+
timeout: 30,
|
|
50
|
+
desiredAccuracy: kCLLocationAccuracyBest,
|
|
51
|
+
allowStale: false,
|
|
52
|
+
samples: 3,
|
|
53
|
+
label: nil,
|
|
54
|
+
persist: true,
|
|
55
|
+
extras: nil,
|
|
56
|
+
success: success,
|
|
57
|
+
failure: failure
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@objc public init(
|
|
62
|
+
type: String,
|
|
63
|
+
maximumAge: Double,
|
|
64
|
+
timeout: Double,
|
|
65
|
+
desiredAccuracy: CLLocationAccuracy,
|
|
66
|
+
allowStale: Bool,
|
|
67
|
+
samples: Int,
|
|
68
|
+
label: String?,
|
|
69
|
+
persist: Bool,
|
|
70
|
+
extras: [AnyHashable: Any]?,
|
|
71
|
+
success: @escaping BGLocationSuccessBlock,
|
|
72
|
+
failure: @escaping BGLocationFailureBlock
|
|
73
|
+
) {
|
|
74
|
+
self.type = type
|
|
75
|
+
self.maximumAge = maximumAge
|
|
76
|
+
self.timeout = timeout
|
|
77
|
+
self.desiredAccuracy = desiredAccuracy
|
|
78
|
+
self.allowStale = allowStale
|
|
79
|
+
self.samples = samples
|
|
80
|
+
self.label = label
|
|
81
|
+
self.persist = persist
|
|
82
|
+
self.extras = extras
|
|
83
|
+
self.success = success
|
|
84
|
+
self.failure = failure
|
|
85
|
+
super.init()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import CoreLocation
|
|
3
|
+
|
|
4
|
+
@objc public class BGDataStore: NSObject {
|
|
5
|
+
|
|
6
|
+
private static var _sharedInstance: BGDataStore?
|
|
7
|
+
private static let lock = NSLock()
|
|
8
|
+
|
|
9
|
+
@objc public var persistQueue: DispatchQueue = DispatchQueue(label: "com.transistorsoft.datastore.persist")
|
|
10
|
+
private var lastOdometerLocation: CLLocation?
|
|
11
|
+
|
|
12
|
+
@objc public class func sharedInstance() -> BGDataStore {
|
|
13
|
+
lock.lock()
|
|
14
|
+
defer { lock.unlock() }
|
|
15
|
+
if _sharedInstance == nil {
|
|
16
|
+
_sharedInstance = BGDataStore()
|
|
17
|
+
}
|
|
18
|
+
return _sharedInstance!
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@objc public override init() {
|
|
22
|
+
super.init()
|
|
23
|
+
initPrivate()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@objc public func initPrivate() {
|
|
27
|
+
persistQueue = DispatchQueue(label: "com.transistorsoft.datastore.persist")
|
|
28
|
+
loadLastOdometerLocation()
|
|
29
|
+
initLocationListeners()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@objc public func initLocationListeners() {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@objc public func persist(_ location: Any?) {
|
|
36
|
+
persistQueue.async {
|
|
37
|
+
self.tryPersist(location, force: false)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@objc public func tryPersist(_ location: Any?, force: Bool) {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@objc public func tryPersist(_ location: Any?, request: Any?) {
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@objc public func flush(_ callback: ((Bool) -> Void)?) {
|
|
48
|
+
persistQueue.async {
|
|
49
|
+
callback?(true)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@objc public func dispatchPersistBlock(_ block: @escaping () -> Void) {
|
|
54
|
+
persistQueue.async(execute: block)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@objc public func loadLastOdometerLocation() {
|
|
58
|
+
if let data = UserDefaults.standard.data(forKey: "BGLastOdometerLocation"),
|
|
59
|
+
let loc = try? NSKeyedUnarchiver.unarchivedObject(ofClass: CLLocation.self, from: data) {
|
|
60
|
+
lastOdometerLocation = loc
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@objc public func persistLastOdometerLocation(_ location: CLLocation) {
|
|
65
|
+
lastOdometerLocation = location
|
|
66
|
+
if let data = try? NSKeyedArchiver.archivedData(withRootObject: location, requiringSecureCoding: true) {
|
|
67
|
+
UserDefaults.standard.set(data, forKey: "BGLastOdometerLocation")
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@objc public func clearLastOdometerLocation() {
|
|
72
|
+
lastOdometerLocation = nil
|
|
73
|
+
UserDefaults.standard.removeObject(forKey: "BGLastOdometerLocation")
|
|
74
|
+
}
|
|
75
|
+
}
|