react-native-nitro-geolocation 1.2.5 → 1.3.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/README.md +55 -278
- package/android/build.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +39 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProvider.kt +310 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidFusedRequestFactory.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationConversions.kt +71 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationErrors.kt +85 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidGeolocationOptions.kt +92 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidLocationSettings.kt +3 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRoute.kt +74 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroBackgroundLocation.kt +132 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/NitroGeolocation.kt +219 -476
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundHttpSync.kt +134 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundPermissions.kt +196 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/AndroidBackgroundSerialization.kt +266 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroActivityRecognitionReceiver.kt +13 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundEventHub.kt +65 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundHeadlessTaskService.kt +58 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationController.kt +710 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundLocationService.kt +48 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundNotificationFactory.kt +37 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBackgroundStore.kt +655 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroBootReceiver.kt +26 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroGeofenceReceiver.kt +14 -0
- package/android/src/main/java/com/margelo/nitro/nitrogeolocation/background/NitroLocationUpdateReceiver.kt +37 -0
- package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidFusedLocationProviderTest.kt +64 -0
- package/android/src/test/java/com/margelo/nitro/nitrogeolocation/AndroidProviderRouteTest.kt +116 -0
- package/ios/IOSBackgroundHttpSync.swift +126 -0
- package/ios/IOSBackgroundLocationDelegate.swift +36 -0
- package/ios/IOSBackgroundMotion.swift +55 -0
- package/ios/IOSBackgroundSerialization.swift +539 -0
- package/ios/IOSGeolocationConversions.swift +131 -0
- package/ios/IOSGeolocationDelegate.swift +31 -0
- package/ios/IOSGeolocationErrors.swift +39 -0
- package/ios/IOSGeolocationOptions.swift +135 -0
- package/ios/NitroBackgroundLocation.swift +849 -0
- package/ios/NitroGeolocation.swift +14 -347
- package/nitrogen/generated/android/c++/JActivityRecognitionOptions.hpp +69 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundLocationOptions.hpp +74 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundLocationStatus.hpp +67 -0
- package/nitrogen/generated/android/c++/JAndroidBackgroundProvider.hpp +61 -0
- package/nitrogen/generated/android/c++/JAndroidForegroundServiceOptions.hpp +90 -0
- package/nitrogen/generated/android/c++/JBackgroundEventEnvelope.hpp +129 -0
- package/nitrogen/generated/android/c++/JBackgroundEventType.hpp +70 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpMethod.hpp +61 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpSyncOptions.hpp +131 -0
- package/nitrogen/generated/android/c++/JBackgroundHttpSyncResult.hpp +111 -0
- package/nitrogen/generated/android/c++/JBackgroundLocation.hpp +110 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationOptions.hpp +162 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationSource.hpp +73 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationState.hpp +70 -0
- package/nitrogen/generated/android/c++/JBackgroundLocationStatus.hpp +126 -0
- package/nitrogen/generated/android/c++/JBackgroundPermissionResult.hpp +79 -0
- package/nitrogen/generated/android/c++/JBackgroundPermissionStatus.hpp +64 -0
- package/nitrogen/generated/android/c++/JBackgroundTrackingMode.hpp +61 -0
- package/nitrogen/generated/android/c++/JBatterySnapshot.hpp +61 -0
- package/nitrogen/generated/android/c++/JDetectedActivity.hpp +66 -0
- package/nitrogen/generated/android/c++/JDetectedActivityType.hpp +76 -0
- package/nitrogen/generated/android/c++/JFunc_void_BackgroundEventEnvelope.hpp +114 -0
- package/nitrogen/generated/android/c++/JFunc_void_BackgroundLocation.hpp +95 -0
- package/nitrogen/generated/android/c++/JGeofenceEvent.hpp +94 -0
- package/nitrogen/generated/android/c++/JGeofenceRegion.hpp +112 -0
- package/nitrogen/generated/android/c++/JGeofenceTransition.hpp +61 -0
- package/nitrogen/generated/android/c++/JGeofencingOptions.hpp +82 -0
- package/nitrogen/generated/android/c++/JGetStoredBackgroundEventsOptions.hpp +90 -0
- package/nitrogen/generated/android/c++/JGetStoredBackgroundLocationsOptions.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.cpp +662 -0
- package/nitrogen/generated/android/c++/JHybridNitroBackgroundLocationSpec.hpp +89 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundActivityType.hpp +67 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundLocationOptions.hpp +79 -0
- package/nitrogen/generated/android/c++/JIOSBackgroundLocationStatus.hpp +61 -0
- package/nitrogen/generated/android/c++/JLocationProviderStatus.hpp +5 -1
- package/nitrogen/generated/android/c++/JStoredBackgroundEventEnvelope.hpp +115 -0
- package/nitrogen/generated/android/c++/JStoredBackgroundLocation.hpp +122 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.cpp +34 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean_String_Double.hpp +100 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/ActivityRecognitionOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundLocationStatus.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidBackgroundProvider.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/AndroidForegroundServiceOptions.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventEnvelope.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundEventType.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpMethod.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncOptions.kt +101 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundHttpSyncResult.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocation.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationOptions.kt +136 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationSource.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationState.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundLocationStatus.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionResult.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundPermissionStatus.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BackgroundTrackingMode.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/BatterySnapshot.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivity.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/DetectedActivityType.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundEventEnvelope.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Func_void_BackgroundLocation.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceEvent.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceRegion.kt +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofenceTransition.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GeofencingOptions.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundEventsOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/GetStoredBackgroundLocationsOptions.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/HybridNitroBackgroundLocationSpec.kt +174 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundActivityType.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationOptions.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/IOSBackgroundLocationStatus.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/LocationProviderStatus.kt +7 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundEventEnvelope.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/StoredBackgroundLocation.kt +111 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitrogeolocation/Variant_NullType_Boolean_String_Double.kt +88 -0
- package/nitrogen/generated/android/nitrogeolocation+autolinking.cmake +3 -0
- package/nitrogen/generated/android/nitrogeolocationOnLoad.cpp +20 -0
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.cpp +104 -15
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Bridge.hpp +1107 -50
- package/nitrogen/generated/ios/NitroGeolocation-Swift-Cxx-Umbrella.hpp +102 -0
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.mm +8 -0
- package/nitrogen/generated/ios/NitroGeolocationAutolinking.swift +15 -3
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroBackgroundLocationSpecSwift.hpp +416 -0
- package/nitrogen/generated/ios/swift/ActivityRecognitionOptions.swift +96 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundLocationOptions.swift +76 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundLocationStatus.swift +58 -0
- package/nitrogen/generated/ios/swift/AndroidBackgroundProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/AndroidForegroundServiceOptions.swift +160 -0
- package/nitrogen/generated/ios/swift/BackgroundEventEnvelope.swift +110 -0
- package/nitrogen/generated/ios/swift/BackgroundEventType.swift +56 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpMethod.swift +44 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpSyncOptions.swift +259 -0
- package/nitrogen/generated/ios/swift/BackgroundHttpSyncResult.swift +87 -0
- package/nitrogen/generated/ios/swift/BackgroundLocation.swift +118 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationOptions.swift +292 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationSource.swift +60 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationState.swift +56 -0
- package/nitrogen/generated/ios/swift/BackgroundLocationStatus.swift +124 -0
- package/nitrogen/generated/ios/swift/BackgroundPermissionResult.swift +81 -0
- package/nitrogen/generated/ios/swift/BackgroundPermissionStatus.swift +48 -0
- package/nitrogen/generated/ios/swift/BackgroundTrackingMode.swift +44 -0
- package/nitrogen/generated/ios/swift/BatterySnapshot.swift +60 -0
- package/nitrogen/generated/ios/swift/DetectedActivity.swift +39 -0
- package/nitrogen/generated/ios/swift/DetectedActivityType.swift +64 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundEventEnvelope.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundHttpSyncResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundLocation.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundLocationStatus.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_BackgroundPermissionResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_BackgroundLocationOptions_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_GeofenceRegion_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundEventEnvelope_.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StoredBackgroundLocation_.swift +46 -0
- package/nitrogen/generated/ios/swift/GeofenceEvent.swift +50 -0
- package/nitrogen/generated/ios/swift/GeofenceRegion.swift +195 -0
- package/nitrogen/generated/ios/swift/GeofenceTransition.swift +44 -0
- package/nitrogen/generated/ios/swift/GeofencingOptions.swift +66 -0
- package/nitrogen/generated/ios/swift/GetStoredBackgroundEventsOptions.swift +102 -0
- package/nitrogen/generated/ios/swift/GetStoredBackgroundLocationsOptions.swift +96 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec.swift +81 -0
- package/nitrogen/generated/ios/swift/HybridNitroBackgroundLocationSpec_cxx.swift +654 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundActivityType.swift +52 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundLocationOptions.swift +125 -0
- package/nitrogen/generated/ios/swift/IOSBackgroundLocationStatus.swift +34 -0
- package/nitrogen/generated/ios/swift/LocationProviderStatus.swift +19 -1
- package/nitrogen/generated/ios/swift/StoredBackgroundEventEnvelope.swift +54 -0
- package/nitrogen/generated/ios/swift/StoredBackgroundLocation.swift +120 -0
- package/nitrogen/generated/ios/swift/Variant_NullType_Bool_String_Double.swift +34 -0
- package/nitrogen/generated/shared/c++/ActivityRecognitionOptions.hpp +95 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundLocationOptions.hpp +100 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundLocationStatus.hpp +93 -0
- package/nitrogen/generated/shared/c++/AndroidBackgroundProvider.hpp +80 -0
- package/nitrogen/generated/shared/c++/AndroidForegroundServiceOptions.hpp +116 -0
- package/nitrogen/generated/shared/c++/BackgroundEventEnvelope.hpp +140 -0
- package/nitrogen/generated/shared/c++/BackgroundEventType.hpp +92 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpMethod.hpp +80 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpSyncOptions.hpp +129 -0
- package/nitrogen/generated/shared/c++/BackgroundHttpSyncResult.hpp +101 -0
- package/nitrogen/generated/shared/c++/BackgroundLocation.hpp +134 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationOptions.hpp +174 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationSource.hpp +96 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationState.hpp +92 -0
- package/nitrogen/generated/shared/c++/BackgroundLocationStatus.hpp +158 -0
- package/nitrogen/generated/shared/c++/BackgroundPermissionResult.hpp +107 -0
- package/nitrogen/generated/shared/c++/BackgroundPermissionStatus.hpp +84 -0
- package/nitrogen/generated/shared/c++/BackgroundTrackingMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/BatterySnapshot.hpp +87 -0
- package/nitrogen/generated/shared/c++/DetectedActivity.hpp +92 -0
- package/nitrogen/generated/shared/c++/DetectedActivityType.hpp +100 -0
- package/nitrogen/generated/shared/c++/GeofenceEvent.hpp +103 -0
- package/nitrogen/generated/shared/c++/GeofenceRegion.hpp +123 -0
- package/nitrogen/generated/shared/c++/GeofenceTransition.hpp +80 -0
- package/nitrogen/generated/shared/c++/GeofencingOptions.hpp +90 -0
- package/nitrogen/generated/shared/c++/GetStoredBackgroundEventsOptions.hpp +98 -0
- package/nitrogen/generated/shared/c++/GetStoredBackgroundLocationsOptions.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.cpp +47 -0
- package/nitrogen/generated/shared/c++/HybridNitroBackgroundLocationSpec.hpp +133 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundActivityType.hpp +88 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundLocationOptions.hpp +105 -0
- package/nitrogen/generated/shared/c++/IOSBackgroundLocationStatus.hpp +87 -0
- package/nitrogen/generated/shared/c++/LocationProviderStatus.hpp +5 -1
- package/nitrogen/generated/shared/c++/StoredBackgroundEventEnvelope.hpp +108 -0
- package/nitrogen/generated/shared/c++/StoredBackgroundLocation.hpp +146 -0
- package/package.json +17 -6
- package/src/NitroGeolocation.nitro.ts +4 -4
- package/src/api/getCurrentPosition.ts +1 -1
- package/src/api/requestLocationSettings.ts +3 -2
- package/src/background/NitroBackgroundLocation.nitro.ts +83 -0
- package/src/background/index.ts +200 -0
- package/src/background/index.web.ts +120 -0
- package/src/background/task.ts +13 -0
- package/src/background/types.ts +328 -0
- package/src/compat/index.web.ts +141 -0
- package/src/index.tsx +3 -0
- package/src/index.web.tsx +41 -0
- package/src/publicTypes.ts +6 -5
- package/src/types.ts +3 -0
- package/src/web/browser.ts +171 -0
- package/src/web/index.ts +167 -0
- package/src/web/useWatchPosition.ts +76 -0
- package/src/web/watch.ts +81 -0
- package/src/devtools/index.test.ts +0 -54
- package/src/utils/errors.test.ts +0 -65
- package/src/utils/provider.test.ts +0 -303
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IOSBackgroundLocationOptions.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `IOSBackgroundActivityType` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitrogeolocation { enum class IOSBackgroundActivityType; }
|
|
33
|
+
|
|
34
|
+
#include "IOSBackgroundActivityType.hpp"
|
|
35
|
+
#include <optional>
|
|
36
|
+
|
|
37
|
+
namespace margelo::nitro::nitrogeolocation {
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A struct which can be represented as a JavaScript object (IOSBackgroundLocationOptions).
|
|
41
|
+
*/
|
|
42
|
+
struct IOSBackgroundLocationOptions final {
|
|
43
|
+
public:
|
|
44
|
+
std::optional<IOSBackgroundActivityType> activityType SWIFT_PRIVATE;
|
|
45
|
+
std::optional<bool> pausesLocationUpdatesAutomatically SWIFT_PRIVATE;
|
|
46
|
+
std::optional<bool> showsBackgroundLocationIndicator SWIFT_PRIVATE;
|
|
47
|
+
std::optional<bool> useSignificantChanges SWIFT_PRIVATE;
|
|
48
|
+
std::optional<double> deferredUpdatesDistance SWIFT_PRIVATE;
|
|
49
|
+
std::optional<double> deferredUpdatesInterval SWIFT_PRIVATE;
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
IOSBackgroundLocationOptions() = default;
|
|
53
|
+
explicit IOSBackgroundLocationOptions(std::optional<IOSBackgroundActivityType> activityType, std::optional<bool> pausesLocationUpdatesAutomatically, std::optional<bool> showsBackgroundLocationIndicator, std::optional<bool> useSignificantChanges, std::optional<double> deferredUpdatesDistance, std::optional<double> deferredUpdatesInterval): activityType(activityType), pausesLocationUpdatesAutomatically(pausesLocationUpdatesAutomatically), showsBackgroundLocationIndicator(showsBackgroundLocationIndicator), useSignificantChanges(useSignificantChanges), deferredUpdatesDistance(deferredUpdatesDistance), deferredUpdatesInterval(deferredUpdatesInterval) {}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
friend bool operator==(const IOSBackgroundLocationOptions& lhs, const IOSBackgroundLocationOptions& rhs) = default;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::nitrogeolocation
|
|
60
|
+
|
|
61
|
+
namespace margelo::nitro {
|
|
62
|
+
|
|
63
|
+
// C++ IOSBackgroundLocationOptions <> JS IOSBackgroundLocationOptions (object)
|
|
64
|
+
template <>
|
|
65
|
+
struct JSIConverter<margelo::nitro::nitrogeolocation::IOSBackgroundLocationOptions> final {
|
|
66
|
+
static inline margelo::nitro::nitrogeolocation::IOSBackgroundLocationOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
+
return margelo::nitro::nitrogeolocation::IOSBackgroundLocationOptions(
|
|
69
|
+
JSIConverter<std::optional<margelo::nitro::nitrogeolocation::IOSBackgroundActivityType>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType"))),
|
|
70
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "pausesLocationUpdatesAutomatically"))),
|
|
71
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "showsBackgroundLocationIndicator"))),
|
|
72
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "useSignificantChanges"))),
|
|
73
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesDistance"))),
|
|
74
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesInterval")))
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitrogeolocation::IOSBackgroundLocationOptions& arg) {
|
|
78
|
+
jsi::Object obj(runtime);
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "activityType"), JSIConverter<std::optional<margelo::nitro::nitrogeolocation::IOSBackgroundActivityType>>::toJSI(runtime, arg.activityType));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "pausesLocationUpdatesAutomatically"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.pausesLocationUpdatesAutomatically));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "showsBackgroundLocationIndicator"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.showsBackgroundLocationIndicator));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "useSignificantChanges"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.useSignificantChanges));
|
|
83
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesDistance"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.deferredUpdatesDistance));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesInterval"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.deferredUpdatesInterval));
|
|
85
|
+
return obj;
|
|
86
|
+
}
|
|
87
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
88
|
+
if (!value.isObject()) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
jsi::Object obj = value.getObject(runtime);
|
|
92
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
if (!JSIConverter<std::optional<margelo::nitro::nitrogeolocation::IOSBackgroundActivityType>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activityType")))) return false;
|
|
96
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "pausesLocationUpdatesAutomatically")))) return false;
|
|
97
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "showsBackgroundLocationIndicator")))) return false;
|
|
98
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "useSignificantChanges")))) return false;
|
|
99
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesDistance")))) return false;
|
|
100
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deferredUpdatesInterval")))) return false;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// IOSBackgroundLocationStatus.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::nitrogeolocation {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A struct which can be represented as a JavaScript object (IOSBackgroundLocationStatus).
|
|
39
|
+
*/
|
|
40
|
+
struct IOSBackgroundLocationStatus final {
|
|
41
|
+
public:
|
|
42
|
+
bool allowsBackgroundLocationUpdates SWIFT_PRIVATE;
|
|
43
|
+
bool significantChangesEnabled SWIFT_PRIVATE;
|
|
44
|
+
|
|
45
|
+
public:
|
|
46
|
+
IOSBackgroundLocationStatus() = default;
|
|
47
|
+
explicit IOSBackgroundLocationStatus(bool allowsBackgroundLocationUpdates, bool significantChangesEnabled): allowsBackgroundLocationUpdates(allowsBackgroundLocationUpdates), significantChangesEnabled(significantChangesEnabled) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const IOSBackgroundLocationStatus& lhs, const IOSBackgroundLocationStatus& rhs) = default;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
} // namespace margelo::nitro::nitrogeolocation
|
|
54
|
+
|
|
55
|
+
namespace margelo::nitro {
|
|
56
|
+
|
|
57
|
+
// C++ IOSBackgroundLocationStatus <> JS IOSBackgroundLocationStatus (object)
|
|
58
|
+
template <>
|
|
59
|
+
struct JSIConverter<margelo::nitro::nitrogeolocation::IOSBackgroundLocationStatus> final {
|
|
60
|
+
static inline margelo::nitro::nitrogeolocation::IOSBackgroundLocationStatus fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
62
|
+
return margelo::nitro::nitrogeolocation::IOSBackgroundLocationStatus(
|
|
63
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowsBackgroundLocationUpdates"))),
|
|
64
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "significantChangesEnabled")))
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitrogeolocation::IOSBackgroundLocationStatus& arg) {
|
|
68
|
+
jsi::Object obj(runtime);
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowsBackgroundLocationUpdates"), JSIConverter<bool>::toJSI(runtime, arg.allowsBackgroundLocationUpdates));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "significantChangesEnabled"), JSIConverter<bool>::toJSI(runtime, arg.significantChangesEnabled));
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
74
|
+
if (!value.isObject()) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
jsi::Object obj = value.getObject(runtime);
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowsBackgroundLocationUpdates")))) return false;
|
|
82
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "significantChangesEnabled")))) return false;
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
} // namespace margelo::nitro
|
|
@@ -44,11 +44,12 @@ namespace margelo::nitro::nitrogeolocation {
|
|
|
44
44
|
std::optional<bool> gpsAvailable SWIFT_PRIVATE;
|
|
45
45
|
std::optional<bool> networkAvailable SWIFT_PRIVATE;
|
|
46
46
|
std::optional<bool> passiveAvailable SWIFT_PRIVATE;
|
|
47
|
+
std::optional<bool> googlePlayServicesAvailable SWIFT_PRIVATE;
|
|
47
48
|
std::optional<bool> googleLocationAccuracyEnabled SWIFT_PRIVATE;
|
|
48
49
|
|
|
49
50
|
public:
|
|
50
51
|
LocationProviderStatus() = default;
|
|
51
|
-
explicit LocationProviderStatus(bool locationServicesEnabled, bool backgroundModeEnabled, std::optional<bool> gpsAvailable, std::optional<bool> networkAvailable, std::optional<bool> passiveAvailable, std::optional<bool> googleLocationAccuracyEnabled): locationServicesEnabled(locationServicesEnabled), backgroundModeEnabled(backgroundModeEnabled), gpsAvailable(gpsAvailable), networkAvailable(networkAvailable), passiveAvailable(passiveAvailable), googleLocationAccuracyEnabled(googleLocationAccuracyEnabled) {}
|
|
52
|
+
explicit LocationProviderStatus(bool locationServicesEnabled, bool backgroundModeEnabled, std::optional<bool> gpsAvailable, std::optional<bool> networkAvailable, std::optional<bool> passiveAvailable, std::optional<bool> googlePlayServicesAvailable, std::optional<bool> googleLocationAccuracyEnabled): locationServicesEnabled(locationServicesEnabled), backgroundModeEnabled(backgroundModeEnabled), gpsAvailable(gpsAvailable), networkAvailable(networkAvailable), passiveAvailable(passiveAvailable), googlePlayServicesAvailable(googlePlayServicesAvailable), googleLocationAccuracyEnabled(googleLocationAccuracyEnabled) {}
|
|
52
53
|
|
|
53
54
|
public:
|
|
54
55
|
friend bool operator==(const LocationProviderStatus& lhs, const LocationProviderStatus& rhs) = default;
|
|
@@ -69,6 +70,7 @@ namespace margelo::nitro {
|
|
|
69
70
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gpsAvailable"))),
|
|
70
71
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "networkAvailable"))),
|
|
71
72
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "passiveAvailable"))),
|
|
73
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "googlePlayServicesAvailable"))),
|
|
72
74
|
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "googleLocationAccuracyEnabled")))
|
|
73
75
|
);
|
|
74
76
|
}
|
|
@@ -79,6 +81,7 @@ namespace margelo::nitro {
|
|
|
79
81
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "gpsAvailable"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.gpsAvailable));
|
|
80
82
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "networkAvailable"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.networkAvailable));
|
|
81
83
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "passiveAvailable"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.passiveAvailable));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "googlePlayServicesAvailable"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.googlePlayServicesAvailable));
|
|
82
85
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "googleLocationAccuracyEnabled"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.googleLocationAccuracyEnabled));
|
|
83
86
|
return obj;
|
|
84
87
|
}
|
|
@@ -95,6 +98,7 @@ namespace margelo::nitro {
|
|
|
95
98
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "gpsAvailable")))) return false;
|
|
96
99
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "networkAvailable")))) return false;
|
|
97
100
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "passiveAvailable")))) return false;
|
|
101
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "googlePlayServicesAvailable")))) return false;
|
|
98
102
|
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "googleLocationAccuracyEnabled")))) return false;
|
|
99
103
|
return true;
|
|
100
104
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// StoredBackgroundEventEnvelope.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `BackgroundEventEnvelope` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitrogeolocation { struct BackgroundEventEnvelope; }
|
|
33
|
+
// Forward declaration of `BackgroundEventType` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitrogeolocation { enum class BackgroundEventType; }
|
|
35
|
+
|
|
36
|
+
#include "BackgroundEventEnvelope.hpp"
|
|
37
|
+
#include <string>
|
|
38
|
+
#include "BackgroundEventType.hpp"
|
|
39
|
+
|
|
40
|
+
namespace margelo::nitro::nitrogeolocation {
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A struct which can be represented as a JavaScript object (StoredBackgroundEventEnvelope).
|
|
44
|
+
*/
|
|
45
|
+
struct StoredBackgroundEventEnvelope final {
|
|
46
|
+
public:
|
|
47
|
+
BackgroundEventEnvelope event SWIFT_PRIVATE;
|
|
48
|
+
double createdAt SWIFT_PRIVATE;
|
|
49
|
+
std::string id SWIFT_PRIVATE;
|
|
50
|
+
BackgroundEventType type SWIFT_PRIVATE;
|
|
51
|
+
double timestamp SWIFT_PRIVATE;
|
|
52
|
+
bool deliveredToJS SWIFT_PRIVATE;
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
StoredBackgroundEventEnvelope() = default;
|
|
56
|
+
explicit StoredBackgroundEventEnvelope(BackgroundEventEnvelope event, double createdAt, std::string id, BackgroundEventType type, double timestamp, bool deliveredToJS): event(event), createdAt(createdAt), id(id), type(type), timestamp(timestamp), deliveredToJS(deliveredToJS) {}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
friend bool operator==(const StoredBackgroundEventEnvelope& lhs, const StoredBackgroundEventEnvelope& rhs) = default;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitrogeolocation
|
|
63
|
+
|
|
64
|
+
namespace margelo::nitro {
|
|
65
|
+
|
|
66
|
+
// C++ StoredBackgroundEventEnvelope <> JS StoredBackgroundEventEnvelope (object)
|
|
67
|
+
template <>
|
|
68
|
+
struct JSIConverter<margelo::nitro::nitrogeolocation::StoredBackgroundEventEnvelope> final {
|
|
69
|
+
static inline margelo::nitro::nitrogeolocation::StoredBackgroundEventEnvelope fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
70
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
71
|
+
return margelo::nitro::nitrogeolocation::StoredBackgroundEventEnvelope(
|
|
72
|
+
JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventEnvelope>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "event"))),
|
|
73
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt"))),
|
|
74
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id"))),
|
|
75
|
+
JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type"))),
|
|
76
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timestamp"))),
|
|
77
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS")))
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitrogeolocation::StoredBackgroundEventEnvelope& arg) {
|
|
81
|
+
jsi::Object obj(runtime);
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "event"), JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventEnvelope>::toJSI(runtime, arg.event));
|
|
83
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "createdAt"), JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "id"), JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
85
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "type"), JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventType>::toJSI(runtime, arg.type));
|
|
86
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "timestamp"), JSIConverter<double>::toJSI(runtime, arg.timestamp));
|
|
87
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS"), JSIConverter<bool>::toJSI(runtime, arg.deliveredToJS));
|
|
88
|
+
return obj;
|
|
89
|
+
}
|
|
90
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
91
|
+
if (!value.isObject()) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
jsi::Object obj = value.getObject(runtime);
|
|
95
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (!JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventEnvelope>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "event")))) return false;
|
|
99
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt")))) return false;
|
|
100
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id")))) return false;
|
|
101
|
+
if (!JSIConverter<margelo::nitro::nitrogeolocation::BackgroundEventType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type")))) return false;
|
|
102
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timestamp")))) return false;
|
|
103
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS")))) return false;
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// StoredBackgroundLocation.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `BackgroundLocationSource` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitrogeolocation { enum class BackgroundLocationSource; }
|
|
33
|
+
// Forward declaration of `LocationProviderUsed` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitrogeolocation { enum class LocationProviderUsed; }
|
|
35
|
+
// Forward declaration of `DetectedActivity` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::nitrogeolocation { struct DetectedActivity; }
|
|
37
|
+
// Forward declaration of `BatterySnapshot` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::nitrogeolocation { struct BatterySnapshot; }
|
|
39
|
+
// Forward declaration of `GeolocationCoordinates` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::nitrogeolocation { struct GeolocationCoordinates; }
|
|
41
|
+
|
|
42
|
+
#include <string>
|
|
43
|
+
#include "BackgroundLocationSource.hpp"
|
|
44
|
+
#include "LocationProviderUsed.hpp"
|
|
45
|
+
#include <optional>
|
|
46
|
+
#include "DetectedActivity.hpp"
|
|
47
|
+
#include "BatterySnapshot.hpp"
|
|
48
|
+
#include "GeolocationCoordinates.hpp"
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro::nitrogeolocation {
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A struct which can be represented as a JavaScript object (StoredBackgroundLocation).
|
|
54
|
+
*/
|
|
55
|
+
struct StoredBackgroundLocation final {
|
|
56
|
+
public:
|
|
57
|
+
std::string id SWIFT_PRIVATE;
|
|
58
|
+
bool deliveredToJS SWIFT_PRIVATE;
|
|
59
|
+
bool synced SWIFT_PRIVATE;
|
|
60
|
+
double createdAt SWIFT_PRIVATE;
|
|
61
|
+
BackgroundLocationSource source SWIFT_PRIVATE;
|
|
62
|
+
bool isFromBackground SWIFT_PRIVATE;
|
|
63
|
+
std::optional<LocationProviderUsed> provider SWIFT_PRIVATE;
|
|
64
|
+
std::optional<bool> mocked SWIFT_PRIVATE;
|
|
65
|
+
double recordedAt SWIFT_PRIVATE;
|
|
66
|
+
std::optional<DetectedActivity> activity SWIFT_PRIVATE;
|
|
67
|
+
std::optional<BatterySnapshot> battery SWIFT_PRIVATE;
|
|
68
|
+
GeolocationCoordinates coords SWIFT_PRIVATE;
|
|
69
|
+
double timestamp SWIFT_PRIVATE;
|
|
70
|
+
|
|
71
|
+
public:
|
|
72
|
+
StoredBackgroundLocation() = default;
|
|
73
|
+
explicit StoredBackgroundLocation(std::string id, bool deliveredToJS, bool synced, double createdAt, BackgroundLocationSource source, bool isFromBackground, std::optional<LocationProviderUsed> provider, std::optional<bool> mocked, double recordedAt, std::optional<DetectedActivity> activity, std::optional<BatterySnapshot> battery, GeolocationCoordinates coords, double timestamp): id(id), deliveredToJS(deliveredToJS), synced(synced), createdAt(createdAt), source(source), isFromBackground(isFromBackground), provider(provider), mocked(mocked), recordedAt(recordedAt), activity(activity), battery(battery), coords(coords), timestamp(timestamp) {}
|
|
74
|
+
|
|
75
|
+
public:
|
|
76
|
+
friend bool operator==(const StoredBackgroundLocation& lhs, const StoredBackgroundLocation& rhs) = default;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro::nitrogeolocation
|
|
80
|
+
|
|
81
|
+
namespace margelo::nitro {
|
|
82
|
+
|
|
83
|
+
// C++ StoredBackgroundLocation <> JS StoredBackgroundLocation (object)
|
|
84
|
+
template <>
|
|
85
|
+
struct JSIConverter<margelo::nitro::nitrogeolocation::StoredBackgroundLocation> final {
|
|
86
|
+
static inline margelo::nitro::nitrogeolocation::StoredBackgroundLocation fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
87
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
88
|
+
return margelo::nitro::nitrogeolocation::StoredBackgroundLocation(
|
|
89
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id"))),
|
|
90
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS"))),
|
|
91
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "synced"))),
|
|
92
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt"))),
|
|
93
|
+
JSIConverter<margelo::nitro::nitrogeolocation::BackgroundLocationSource>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source"))),
|
|
94
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isFromBackground"))),
|
|
95
|
+
JSIConverter<std::optional<margelo::nitro::nitrogeolocation::LocationProviderUsed>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "provider"))),
|
|
96
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mocked"))),
|
|
97
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordedAt"))),
|
|
98
|
+
JSIConverter<std::optional<margelo::nitro::nitrogeolocation::DetectedActivity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activity"))),
|
|
99
|
+
JSIConverter<std::optional<margelo::nitro::nitrogeolocation::BatterySnapshot>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "battery"))),
|
|
100
|
+
JSIConverter<margelo::nitro::nitrogeolocation::GeolocationCoordinates>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "coords"))),
|
|
101
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timestamp")))
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::nitrogeolocation::StoredBackgroundLocation& arg) {
|
|
105
|
+
jsi::Object obj(runtime);
|
|
106
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "id"), JSIConverter<std::string>::toJSI(runtime, arg.id));
|
|
107
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS"), JSIConverter<bool>::toJSI(runtime, arg.deliveredToJS));
|
|
108
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "synced"), JSIConverter<bool>::toJSI(runtime, arg.synced));
|
|
109
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "createdAt"), JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
110
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "source"), JSIConverter<margelo::nitro::nitrogeolocation::BackgroundLocationSource>::toJSI(runtime, arg.source));
|
|
111
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "isFromBackground"), JSIConverter<bool>::toJSI(runtime, arg.isFromBackground));
|
|
112
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "provider"), JSIConverter<std::optional<margelo::nitro::nitrogeolocation::LocationProviderUsed>>::toJSI(runtime, arg.provider));
|
|
113
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "mocked"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.mocked));
|
|
114
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordedAt"), JSIConverter<double>::toJSI(runtime, arg.recordedAt));
|
|
115
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "activity"), JSIConverter<std::optional<margelo::nitro::nitrogeolocation::DetectedActivity>>::toJSI(runtime, arg.activity));
|
|
116
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "battery"), JSIConverter<std::optional<margelo::nitro::nitrogeolocation::BatterySnapshot>>::toJSI(runtime, arg.battery));
|
|
117
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "coords"), JSIConverter<margelo::nitro::nitrogeolocation::GeolocationCoordinates>::toJSI(runtime, arg.coords));
|
|
118
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "timestamp"), JSIConverter<double>::toJSI(runtime, arg.timestamp));
|
|
119
|
+
return obj;
|
|
120
|
+
}
|
|
121
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
122
|
+
if (!value.isObject()) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
jsi::Object obj = value.getObject(runtime);
|
|
126
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "id")))) return false;
|
|
130
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deliveredToJS")))) return false;
|
|
131
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "synced")))) return false;
|
|
132
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt")))) return false;
|
|
133
|
+
if (!JSIConverter<margelo::nitro::nitrogeolocation::BackgroundLocationSource>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source")))) return false;
|
|
134
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isFromBackground")))) return false;
|
|
135
|
+
if (!JSIConverter<std::optional<margelo::nitro::nitrogeolocation::LocationProviderUsed>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "provider")))) return false;
|
|
136
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mocked")))) return false;
|
|
137
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordedAt")))) return false;
|
|
138
|
+
if (!JSIConverter<std::optional<margelo::nitro::nitrogeolocation::DetectedActivity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "activity")))) return false;
|
|
139
|
+
if (!JSIConverter<std::optional<margelo::nitro::nitrogeolocation::BatterySnapshot>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "battery")))) return false;
|
|
140
|
+
if (!JSIConverter<margelo::nitro::nitrogeolocation::GeolocationCoordinates>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "coords")))) return false;
|
|
141
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "timestamp")))) return false;
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
} // namespace margelo::nitro
|
package/package.json
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-geolocation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Nitro-powered native geolocation for modern React Native apps",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"source": "src/index",
|
|
7
|
+
"browser": "src/index.web.tsx",
|
|
8
|
+
"react-native": "src/index.tsx",
|
|
7
9
|
"exports": {
|
|
8
10
|
".": {
|
|
9
11
|
"types": "./src/index.tsx",
|
|
12
|
+
"browser": "./src/index.web.tsx",
|
|
13
|
+
"react-native": "./src/index.tsx",
|
|
10
14
|
"default": "./src/index.tsx"
|
|
11
15
|
},
|
|
12
16
|
"./compat": {
|
|
13
17
|
"types": "./src/compat/index.tsx",
|
|
18
|
+
"browser": "./src/compat/index.web.ts",
|
|
19
|
+
"react-native": "./src/compat/index.tsx",
|
|
14
20
|
"default": "./src/compat/index.tsx"
|
|
21
|
+
},
|
|
22
|
+
"./background": {
|
|
23
|
+
"types": "./src/background/index.ts",
|
|
24
|
+
"browser": "./src/background/index.web.ts",
|
|
25
|
+
"react-native": "./src/background/index.ts",
|
|
26
|
+
"default": "./src/background/index.ts"
|
|
15
27
|
}
|
|
16
28
|
},
|
|
17
29
|
"codegenConfig": {
|
|
@@ -49,12 +61,8 @@
|
|
|
49
61
|
},
|
|
50
62
|
"files": [
|
|
51
63
|
"src",
|
|
52
|
-
"react-native.config.js",
|
|
53
|
-
"lib",
|
|
54
64
|
"nitrogen",
|
|
55
|
-
"cpp",
|
|
56
65
|
"android/build.gradle",
|
|
57
|
-
"android/fix-prefab.gradle",
|
|
58
66
|
"android/gradle.properties",
|
|
59
67
|
"android/CMakeLists.txt",
|
|
60
68
|
"android/src/**/*",
|
|
@@ -63,7 +71,10 @@
|
|
|
63
71
|
"ios/**/*.mm",
|
|
64
72
|
"ios/**/*.cpp",
|
|
65
73
|
"ios/**/*.swift",
|
|
66
|
-
"
|
|
74
|
+
"!src/**/*.test.ts",
|
|
75
|
+
"!src/**/*.test.tsx",
|
|
76
|
+
"!src/**/*.spec.ts",
|
|
77
|
+
"!src/**/*.spec.tsx",
|
|
67
78
|
"*.podspec",
|
|
68
79
|
"README.md"
|
|
69
80
|
],
|
|
@@ -65,9 +65,9 @@ export interface GeolocationConfiguration {
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Android: Location provider
|
|
68
|
-
* - 'playServices':
|
|
68
|
+
* - 'playServices': Prefer Google Play Services (fused location), then platform fallback
|
|
69
69
|
* - 'android_platform': Use Android platform LocationManager
|
|
70
|
-
* - 'auto':
|
|
70
|
+
* - 'auto': Prefer Google Play Services (fused location), then platform fallback
|
|
71
71
|
*/
|
|
72
72
|
locationProvider?: LocationProvider;
|
|
73
73
|
}
|
|
@@ -296,7 +296,7 @@ export interface NitroGeolocation
|
|
|
296
296
|
* Get whether the current platform is likely to deliver location updates.
|
|
297
297
|
*
|
|
298
298
|
* Android: uses Fused Location availability when the configured provider is
|
|
299
|
-
* Play Services,
|
|
299
|
+
* auto or Play Services, then falls back to platform provider/service checks.
|
|
300
300
|
*
|
|
301
301
|
* iOS: maps Core Location service and authorization state.
|
|
302
302
|
*/
|
|
@@ -347,7 +347,7 @@ export interface NitroGeolocation
|
|
|
347
347
|
*
|
|
348
348
|
* Strategy:
|
|
349
349
|
* 1. Check cached location (if maximumAge allows)
|
|
350
|
-
* 2. Request fresh location from
|
|
350
|
+
* 2. Request fresh location from the configured native provider
|
|
351
351
|
* 3. Timeout after specified duration
|
|
352
352
|
*
|
|
353
353
|
* Internal native contract. The public JS API wraps this in a Promise so
|
|
@@ -9,7 +9,7 @@ import type { GeolocationResponse } from "../publicTypes";
|
|
|
9
9
|
*
|
|
10
10
|
* Strategy:
|
|
11
11
|
* 1. Check cached location (if maximumAge allows)
|
|
12
|
-
* 2. Request fresh location from
|
|
12
|
+
* 2. Request fresh location from the configured native provider
|
|
13
13
|
* 3. Timeout after specified duration
|
|
14
14
|
*
|
|
15
15
|
* @param options - Location request options
|
|
@@ -13,8 +13,9 @@ import type { LocationProviderStatus } from "../publicTypes";
|
|
|
13
13
|
* the current Core Location status:
|
|
14
14
|
* - `locationServicesEnabled`: `CLLocationManager.locationServicesEnabled()`
|
|
15
15
|
* - `backgroundModeEnabled`: whether `UIBackgroundModes` contains `location`
|
|
16
|
-
* - `gpsAvailable`, `networkAvailable`, `passiveAvailable`,
|
|
17
|
-
* `googleLocationAccuracyEnabled`:
|
|
16
|
+
* - `gpsAvailable`, `networkAvailable`, `passiveAvailable`,
|
|
17
|
+
* `googlePlayServicesAvailable`, and `googleLocationAccuracyEnabled`:
|
|
18
|
+
* `undefined`
|
|
18
19
|
*/
|
|
19
20
|
export function requestLocationSettings(
|
|
20
21
|
options?: LocationSettingsOptions
|