@woosmap/react-native-plugin-geofencing 0.14.0 → 1.0.0-beta.1

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.0
2
+ - Enhancement: Introduced the `WoosmapGeofencingTurbo` TurboModule (New Architecture).
3
+ — The region-CRUD and key/radius methods `addRegion`, `removeRegions`, `getRegions`, `setPoiRadius`, `setWoosmapApiKey` now dispatch through the generated codegen path. All other methods continue to flow through the legacy `PluginGeofencing` module. Public JS API is unchanged.
4
+
1
5
  ## 0.14.0
2
6
  - Breaking: Raised minimum supported React Native to `0.85.x`; React `19.2.3`.
3
7
  - Breaking: Android requires JDK 17, Kotlin `2.1.x`, AGP `8.10.x`, Gradle `8.14.x`, `compileSdk`/`targetSdk` `36`.
@@ -17,6 +17,16 @@ apply plugin: "com.android.library"
17
17
 
18
18
  if (isNewArchitectureEnabled()) {
19
19
  apply plugin: "com.facebook.react"
20
+
21
+ // Drives TurboModule codegen for the WoosmapGeofencingTurbo spec
22
+ // (src/NativeWoosmapGeofencingTurbo.ts). Generates the abstract
23
+ // `NativeWoosmapGeofencingTurboSpec` class under `codegenJavaPackageName`,
24
+ // which WoosmapGeofencingTurboModule extends.
25
+ react {
26
+ jsRootDir = file("../src/")
27
+ libraryName = "WoosmapGeofencingTurbo"
28
+ codegenJavaPackageName = "com.woosmap.reactnativeplugingeofencing"
29
+ }
20
30
  }
21
31
 
22
32
  def getExtOrDefault(name) {
@@ -460,6 +460,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
460
460
  * @param data accepts Woosmap API key in a Readable array.
461
461
  * @param promise React native callback context.
462
462
  */
463
+ // implemented in turbo (WoosmapGeofencingTurbo)
464
+ @Deprecated
463
465
  @ReactMethod
464
466
  public void setWoosmapApiKey(ReadableArray data, Promise promise) {
465
467
  try {
@@ -674,6 +676,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
674
676
  * @param radius A string containing POI radius value in number,string,double format.
675
677
  * @param promise React native callback context.
676
678
  */
679
+ // implemented in turbo (WoosmapGeofencingTurbo)
680
+ @Deprecated
677
681
  @ReactMethod
678
682
  public void setPoiRadius(String radius, Promise promise) {
679
683
  try {
@@ -733,6 +737,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
733
737
  * @param map Readable map with region detail.
734
738
  * @param promise React native callback context.
735
739
  */
740
+ // implemented in turbo (WoosmapGeofencingTurbo)
741
+ @Deprecated
736
742
  @RequiresApi(api = Build.VERSION_CODES.N)
737
743
  @ReactMethod
738
744
  public void addRegion(ReadableMap map, Promise promise) {
@@ -764,6 +770,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
764
770
  * @param regionid A string unique value for region.
765
771
  * @param promise React native callback context.
766
772
  */
773
+ // implemented in turbo (WoosmapGeofencingTurbo)
774
+ @Deprecated
767
775
  @RequiresApi(api = Build.VERSION_CODES.N)
768
776
  @ReactMethod
769
777
  public void getRegions(String regionid, Promise promise){
@@ -789,6 +797,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
789
797
  * Gets all saved region from the database.
790
798
  * @param promise React native callback context.
791
799
  */
800
+ // implemented in turbo (WoosmapGeofencingTurbo — getRegions handles all + single)
801
+ @Deprecated
792
802
  @RequiresApi(api = Build.VERSION_CODES.N)
793
803
  @ReactMethod
794
804
  public void getAllRegions(Promise promise){
@@ -809,6 +819,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
809
819
  * @param regionid A unique string region id which is to be removed.
810
820
  * @param promise React native callback context.
811
821
  */
822
+ // implemented in turbo (WoosmapGeofencingTurbo)
823
+ @Deprecated
812
824
  @RequiresApi(api = Build.VERSION_CODES.N)
813
825
  @ReactMethod
814
826
  private void removeRegion(String regionid, Promise promise){
@@ -832,6 +844,8 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
832
844
  * Removes all region from saved database.
833
845
  * @param promise React native callback context.
834
846
  */
847
+ // implemented in turbo (WoosmapGeofencingTurbo)
848
+ @Deprecated
835
849
  @RequiresApi(api = Build.VERSION_CODES.N)
836
850
  @ReactMethod
837
851
  private void removeAllRegions(Promise promise){
@@ -0,0 +1,185 @@
1
+ package com.reactnativeplugingeofencing;
2
+
3
+ import android.os.Build;
4
+
5
+ import androidx.annotation.NonNull;
6
+ import androidx.annotation.Nullable;
7
+ import androidx.annotation.RequiresApi;
8
+
9
+ import com.facebook.react.bridge.Promise;
10
+ import com.facebook.react.bridge.ReactApplicationContext;
11
+ import com.facebook.react.bridge.ReadableMap;
12
+ import com.facebook.react.module.annotations.ReactModule;
13
+ import com.woosmap.reactnativeplugingeofencing.NativeWoosmapGeofencingTurboSpec;
14
+ import com.webgeoservices.woosmapgeofencing.Woosmap;
15
+ import com.webgeoservices.woosmapgeofencing.WoosmapSettings;
16
+ import com.webgeoservices.woosmapgeofencingcore.database.Region;
17
+
18
+ /**
19
+ * TurboModule implementation for the region-CRUD + key/radius slice migrated
20
+ * Extends the codegen-generated
21
+ * {@code NativeWoosmapGeofencingTurboSpec} abstract class.
22
+ *
23
+ * <p>This is a thin adapter over the shared {@link WoosmapTask} /
24
+ * {@link WoosmapSettings} layer — the same layer the legacy
25
+ * {@code PluginGeofencingModule} talks to — so the two modules stay
26
+ * independent without duplicating business logic. The SDK singleton
27
+ * ({@link Woosmap#getInstance()}) is shared, so a region added here lands in
28
+ * the same store that {@code initialize()} (still on the legacy module) set up.
29
+ */
30
+ @ReactModule(name = WoosmapGeofencingTurboModule.NAME)
31
+ public class WoosmapGeofencingTurboModule extends NativeWoosmapGeofencingTurboSpec {
32
+ public static final String NAME = "WoosmapGeofencingTurbo";
33
+
34
+ private final ReactApplicationContext reactContext;
35
+
36
+ public WoosmapGeofencingTurboModule(ReactApplicationContext reactContext) {
37
+ super(reactContext);
38
+ this.reactContext = reactContext;
39
+ }
40
+
41
+ @Override
42
+ @NonNull
43
+ public String getName() {
44
+ return NAME;
45
+ }
46
+
47
+ /**
48
+ * The Woosmap SDK is a process singleton initialised by the legacy module's
49
+ * {@code initialize()}. We can't see that module's private field, so we use
50
+ * the singleton's presence as the readiness proxy for this sprint.
51
+ */
52
+ private boolean isWoosmapInitialized() {
53
+ return Woosmap.getInstance() != null;
54
+ }
55
+
56
+ private boolean onlyContainsNumbers(String text) {
57
+ try {
58
+ Long.parseLong(text);
59
+ return true;
60
+ } catch (NumberFormatException ex) {
61
+ return false;
62
+ }
63
+ }
64
+
65
+ private boolean onlyContainsDouble(String text) {
66
+ try {
67
+ Double.parseDouble(text);
68
+ return true;
69
+ } catch (NumberFormatException ex) {
70
+ return false;
71
+ }
72
+ }
73
+
74
+ @Override
75
+ public void setWoosmapApiKey(String apiKey, Promise promise) {
76
+ try {
77
+ if (!isWoosmapInitialized()) {
78
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
79
+ return;
80
+ }
81
+ if (apiKey == null || apiKey.isEmpty()) {
82
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapKeyNotProvide);
83
+ return;
84
+ }
85
+ WoosmapSettings.privateKeyWoosmapAPI = apiKey;
86
+ promise.resolve(WoosmapMessageAndKey.successMessage);
87
+ } catch (Exception ex) {
88
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
89
+ }
90
+ }
91
+
92
+ @Override
93
+ public void setPoiRadius(String radius, Promise promise) {
94
+ try {
95
+ if (!isWoosmapInitialized()) {
96
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
97
+ return;
98
+ }
99
+ if (radius == null || radius.isEmpty()) {
100
+ throw new Exception(WoosmapMessageAndKey.radiusEmptyMessage);
101
+ }
102
+ if (onlyContainsNumbers(radius)) {
103
+ WoosmapSettings.poiRadius = Integer.parseInt(radius);
104
+ } else if (onlyContainsDouble(radius)) {
105
+ WoosmapSettings.poiRadius = (int) Math.round(Double.parseDouble(radius));
106
+ } else {
107
+ WoosmapSettings.poiRadiusNameFromResponse = radius;
108
+ }
109
+ promise.resolve(WoosmapMessageAndKey.successMessage);
110
+ } catch (Exception ex) {
111
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
112
+ }
113
+ }
114
+
115
+ @RequiresApi(api = Build.VERSION_CODES.N)
116
+ @Override
117
+ public void addRegion(ReadableMap region, Promise promise) {
118
+ try {
119
+ if (!isWoosmapInitialized()) {
120
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
121
+ return;
122
+ }
123
+ if (region == null || region.toHashMap().isEmpty()) {
124
+ throw new Exception(WoosmapMessageAndKey.regionInfoEmptyMessage);
125
+ }
126
+ Region woosRegion = new Region();
127
+ woosRegion.identifier = region.getString("regionId");
128
+ woosRegion.idStore = region.hasKey("idStore") ? region.getString("idStore") : "";
129
+ woosRegion.lat = region.getDouble("lat");
130
+ woosRegion.lng = region.getDouble("lng");
131
+ woosRegion.type = region.hasKey("type") ? region.getString("type") : "";
132
+ woosRegion.radius = region.getDouble("radius");
133
+
134
+ WoosmapTask.getInstance(reactContext).addRegion(woosRegion, promise);
135
+ } catch (Exception ex) {
136
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
137
+ }
138
+ }
139
+
140
+ @RequiresApi(api = Build.VERSION_CODES.N)
141
+ @Override
142
+ public void getRegions(@Nullable String regionId, Promise promise) {
143
+ try {
144
+ if (!isWoosmapInitialized()) {
145
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
146
+ return;
147
+ }
148
+ WoosmapTask.getInstance(reactContext).enqueGetRegionsAsArrayRequest(regionId, promise);
149
+ } catch (Exception ex) {
150
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
151
+ }
152
+ }
153
+
154
+ @RequiresApi(api = Build.VERSION_CODES.N)
155
+ @Override
156
+ public void removeRegion(String regionId, Promise promise) {
157
+ try {
158
+ if (!isWoosmapInitialized()) {
159
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
160
+ return;
161
+ }
162
+ if (regionId == null || regionId.isEmpty()) {
163
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.requiredRegionid);
164
+ return;
165
+ }
166
+ WoosmapTask.getInstance(reactContext).removeRegion(regionId, promise);
167
+ } catch (Exception ex) {
168
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
169
+ }
170
+ }
171
+
172
+ @RequiresApi(api = Build.VERSION_CODES.N)
173
+ @Override
174
+ public void removeAllRegions(Promise promise) {
175
+ try {
176
+ if (!isWoosmapInitialized()) {
177
+ promise.reject(WoosmapMessageAndKey.errorCode, WoosmapMessageAndKey.woosmapNotInitialized);
178
+ return;
179
+ }
180
+ WoosmapTask.getInstance(reactContext).removeRegion("", promise);
181
+ } catch (Exception ex) {
182
+ promise.reject(WoosmapMessageAndKey.errorCode, ex.getMessage());
183
+ }
184
+ }
185
+ }
@@ -0,0 +1,51 @@
1
+ package com.reactnativeplugingeofencing;
2
+
3
+ import androidx.annotation.Nullable;
4
+
5
+ import com.facebook.react.TurboReactPackage;
6
+ import com.facebook.react.bridge.NativeModule;
7
+ import com.facebook.react.bridge.ReactApplicationContext;
8
+ import com.facebook.react.module.model.ReactModuleInfo;
9
+ import com.facebook.react.module.model.ReactModuleInfoProvider;
10
+
11
+ import java.util.HashMap;
12
+ import java.util.Map;
13
+
14
+ /**
15
+ * TurboReactPackage that registers {@link WoosmapGeofencingTurboModule}.
16
+ *
17
+ * <p>Kept separate from {@code PluginGeofencingPackage} so the New-Architecture
18
+ * module and the legacy module load independently. To avoid the startup-race
19
+ * register this package <em>before</em> the legacy one
20
+ * in the host app's {@code MainApplication} package list.
21
+ */
22
+ public class WoosmapGeofencingTurboPackage extends TurboReactPackage {
23
+
24
+ @Nullable
25
+ @Override
26
+ public NativeModule getModule(String name, ReactApplicationContext reactContext) {
27
+ if (WoosmapGeofencingTurboModule.NAME.equals(name)) {
28
+ return new WoosmapGeofencingTurboModule(reactContext);
29
+ }
30
+ return null;
31
+ }
32
+
33
+ @Override
34
+ public ReactModuleInfoProvider getReactModuleInfoProvider() {
35
+ return () -> {
36
+ Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
37
+ moduleInfos.put(
38
+ WoosmapGeofencingTurboModule.NAME,
39
+ new ReactModuleInfo(
40
+ WoosmapGeofencingTurboModule.NAME,
41
+ WoosmapGeofencingTurboModule.NAME,
42
+ false, // canOverrideExistingModule
43
+ false, // needsEagerInit
44
+ false, // isCxxModule
45
+ true // isTurboModule
46
+ )
47
+ );
48
+ return moduleInfos;
49
+ };
50
+ }
51
+ }
@@ -117,6 +117,45 @@ public class WoosmapTask {
117
117
  }
118
118
  });
119
119
  }
120
+
121
+ /**
122
+ * Resolves regions as a {@link WritableArray} in all cases. Used by the
123
+ * WoosmapGeofencingTurbo module, whose getRegions spec always returns a
124
+ * collection (the legacy getRegions(id) resolved a single object instead).
125
+ * A null/empty regionID returns every saved region.
126
+ * @param regionID region id to fetch, or null/empty for all regions.
127
+ * @param promise React native callback context.
128
+ */
129
+ @RequiresApi(api = Build.VERSION_CODES.N)
130
+ public void enqueGetRegionsAsArrayRequest(String regionID, Promise promise) {
131
+ CompletableFuture.supplyAsync(() -> {
132
+ try {
133
+ WritableArray array = Arguments.createArray();
134
+ if (regionID == null || regionID.isEmpty()) {
135
+ Region[] regions = WoosmapDb.getInstance(context).getRegionsDAO().getAllRegions();
136
+ for (Region region : regions) {
137
+ array.pushMap(WoosmapUtil.getRegionWritableMap(region));
138
+ }
139
+ } else {
140
+ Region region = WoosmapDb.getInstance(context).getRegionsDAO().getRegionFromId(regionID);
141
+ if (region == null) {
142
+ throw new Exception(WoosmapMessageAndKey.invalidRegionid);
143
+ }
144
+ array.pushMap(WoosmapUtil.getRegionWritableMap(region));
145
+ }
146
+ return array;
147
+ } catch (Exception ex) {
148
+ throw new CompletionException(ex);
149
+ }
150
+ }).whenComplete((data, throwable) -> {
151
+ if (throwable == null) {
152
+ promise.resolve(data);
153
+ } else {
154
+ promise.reject(WoosmapMessageAndKey.errorCode, throwable.getMessage());
155
+ }
156
+ });
157
+ }
158
+
120
159
  @RequiresApi(api = Build.VERSION_CODES.N)
121
160
  public void removeRegion(String regionId, final Promise promise){
122
161
  CompletableFuture.supplyAsync((Supplier<Void>) () -> {
@@ -159,6 +159,8 @@ class PluginGeofencing: RCTEventEmitter {
159
159
 
160
160
  /// Updating new woosmap key
161
161
  /// - Parameter command: -
162
+ // implemented in turbo (WoosmapGeofencingTurbo)
163
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
162
164
  @objc(setWoosmapApiKey:withResolver:withRejecter:)
163
165
  func setWoosmapApiKey(command: NSArray, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void{
164
166
 
@@ -451,6 +453,8 @@ class PluginGeofencing: RCTEventEmitter {
451
453
  /// - regioninfo: regioninfo description
452
454
  /// - resolve: return Reference watchid on successfully call
453
455
  /// - reject: return error info
456
+ // implemented in turbo (WoosmapGeofencingTurbo)
457
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
454
458
  @objc(addRegion:withResolver:withRejecter:)
455
459
  func addRegion(regioninfo:NSDictionary, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
456
460
  if let woosService = WoosmapGeofenceService.shared {
@@ -564,6 +568,8 @@ class PluginGeofencing: RCTEventEmitter {
564
568
  /// - radius: radius enum or number in meters
565
569
  /// - resolve: return Ok on successfully call
566
570
  /// - reject: return error info
571
+ // implemented in turbo (WoosmapGeofencingTurbo)
572
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
567
573
  @objc(setPoiRadius:withResolver:withRejecter:)
568
574
  func setPoiRadius (radius: String, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
569
575
  if WoosmapGeofenceService.shared != nil {
@@ -598,6 +604,8 @@ class PluginGeofencing: RCTEventEmitter {
598
604
  /// - Parameters:
599
605
  /// - resolve: return list of Array with region info
600
606
  /// - reject: return error info
607
+ // implemented in turbo (WoosmapGeofencingTurbo — getRegions handles all + single)
608
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
601
609
  @objc(getAllRegions:withRejecter:)
602
610
  func getAllRegions(resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
603
611
  if let objWoos = WoosmapGeofenceService.shared {
@@ -620,6 +628,8 @@ class PluginGeofencing: RCTEventEmitter {
620
628
  /// - regionid: regionid to fetch
621
629
  /// - resolve: return region info
622
630
  /// - reject: error info
631
+ // implemented in turbo (WoosmapGeofencingTurbo)
632
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
623
633
  @objc(getRegions:withResolver:withRejecter:)
624
634
  func getRegions(regionid:String, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
625
635
  if let objWoos = WoosmapGeofenceService.shared {
@@ -650,6 +660,8 @@ class PluginGeofencing: RCTEventEmitter {
650
660
  /// - Parameters:
651
661
  /// - resolve: return regionDeleted
652
662
  /// - reject: error info
663
+ // implemented in turbo (WoosmapGeofencingTurbo)
664
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
653
665
  @objc(removeAllRegions:withRejecter:)
654
666
  func removeAllRegions(resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
655
667
  if let objWoos = WoosmapGeofenceService.shared {
@@ -667,6 +679,8 @@ class PluginGeofencing: RCTEventEmitter {
667
679
  /// - regionid: region id
668
680
  /// - resolve: return regionDeleted
669
681
  /// - reject: error info
682
+ // implemented in turbo (WoosmapGeofencingTurbo)
683
+ @available(*, deprecated, message: "Implemented in the WoosmapGeofencingTurbo TurboModule")
670
684
  @objc(removeRegion:withResolver:withRejecter:)
671
685
  func removeRegion(regionid:String, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) {
672
686
  if let objWoos = WoosmapGeofenceService.shared {
@@ -0,0 +1,66 @@
1
+ #import <React/RCTBridgeModule.h>
2
+
3
+ #ifdef RCT_NEW_ARCH_ENABLED
4
+ // Generated by codegen from src/NativeWoosmapGeofencingTurbo.ts via the
5
+ // `WoosmapGeofencingTurboSpec` codegenConfig entry in package.json. Provides
6
+ // the RCTNativeWoosmapGeofencingTurboSpec protocol and the
7
+ // NativeWoosmapGeofencingTurboSpecJSI C++ TurboModule.
8
+ #import <WoosmapGeofencingTurboSpec/WoosmapGeofencingTurboSpec.h>
9
+ #endif
10
+
11
+ // Bridges the Swift `WoosmapGeofencingTurbo` implementation to React Native.
12
+ // The selectors below must match the @objc(...) selectors declared in
13
+ // WoosmapGeofencingTurbo.swift.
14
+ @interface RCT_EXTERN_MODULE(WoosmapGeofencingTurbo, NSObject)
15
+
16
+ // Selectors follow the React Native codegen Promise convention
17
+ // (`<method>:resolve:reject:`, or `<method>:reject:` for no-arg methods) so the
18
+ // generated NativeWoosmapGeofencingTurboSpecJSI bindings dispatch correctly.
19
+ RCT_EXTERN_METHOD(setWoosmapApiKey:(NSString *)apiKey
20
+ resolve:(RCTPromiseResolveBlock)resolve
21
+ reject:(RCTPromiseRejectBlock)reject)
22
+
23
+ RCT_EXTERN_METHOD(setPoiRadius:(NSString *)radius
24
+ resolve:(RCTPromiseResolveBlock)resolve
25
+ reject:(RCTPromiseRejectBlock)reject)
26
+
27
+ RCT_EXTERN_METHOD(addRegion:(NSDictionary *)region
28
+ resolve:(RCTPromiseResolveBlock)resolve
29
+ reject:(RCTPromiseRejectBlock)reject)
30
+
31
+ RCT_EXTERN_METHOD(getRegions:(NSString *)regionId
32
+ resolve:(RCTPromiseResolveBlock)resolve
33
+ reject:(RCTPromiseRejectBlock)reject)
34
+
35
+ RCT_EXTERN_METHOD(removeAllRegions:(RCTPromiseResolveBlock)resolve
36
+ reject:(RCTPromiseRejectBlock)reject)
37
+
38
+ RCT_EXTERN_METHOD(removeRegion:(NSString *)regionId
39
+ resolve:(RCTPromiseResolveBlock)resolve
40
+ reject:(RCTPromiseRejectBlock)reject)
41
+
42
+ + (BOOL)requiresMainQueueSetup
43
+ {
44
+ return YES;
45
+ }
46
+
47
+ @end
48
+
49
+ #ifdef RCT_NEW_ARCH_ENABLED
50
+ // Vends the JSI TurboModule so the 6 methods dispatch through the generated
51
+ // codegen path (no ObjCTurboModule reflection fallback). Implemented as a
52
+ // category on the Swift class because getTurboModule: returns a C++ type that
53
+ // cannot be expressed in Swift.
54
+ @interface WoosmapGeofencingTurbo (TurboModule) <RCTTurboModule>
55
+ @end
56
+
57
+ @implementation WoosmapGeofencingTurbo (TurboModule)
58
+
59
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
60
+ (const facebook::react::ObjCTurboModule::InitParams &)params
61
+ {
62
+ return std::make_shared<facebook::react::NativeWoosmapGeofencingTurboSpecJSI>(params);
63
+ }
64
+
65
+ @end
66
+ #endif
@@ -0,0 +1,229 @@
1
+ import CoreLocation
2
+ import WoosmapGeofencing
3
+
4
+ /// TurboModule implementation for the region-CRUD + key/radius slice migrated
5
+ /// This is a thin adapter over the shared
6
+ /// `WoosmapGeofenceService` — the same service the legacy `PluginGeofencing`
7
+ /// module talks to — so the two modules stay independent without duplicating
8
+ /// business logic.
9
+ ///
10
+ /// The Objective-C++ bridge in `WoosmapGeofencingTurbo.mm` exposes these
11
+ /// methods to the generated `RCTNativeWoosmapGeofencingTurboSpec` protocol and
12
+ /// vends the JSI TurboModule.
13
+ @objc(WoosmapGeofencingTurbo)
14
+ class WoosmapGeofencingTurbo: NSObject {
15
+
16
+ @objc static func requiresMainQueueSetup() -> Bool {
17
+ return true
18
+ }
19
+
20
+ private func woosmapError(_ msg: String) -> NSError {
21
+ return NSError(
22
+ domain: WoosmapGeofenceMessage.plugin_errorDomain,
23
+ code: WoosmapGeofenceMessage.plugin_errorcode,
24
+ userInfo: [NSLocalizedDescriptionKey: msg]
25
+ )
26
+ }
27
+
28
+ private func formatRegionData(woosdata: Region) -> [AnyHashable: Any] {
29
+ var result: [AnyHashable: Any] = [:]
30
+ result["date"] = woosdata.date.timeIntervalSince1970 * 1000
31
+ result["didenter"] = woosdata.didEnter
32
+ result["identifier"] = woosdata.identifier
33
+ result["latitude"] = woosdata.latitude
34
+ result["longitude"] = woosdata.longitude
35
+ result["radius"] = woosdata.radius
36
+ result["frompositiondetection"] = woosdata.fromPositionDetection
37
+ result["eventname"] = woosdata.eventName
38
+ result["spenttime"] = woosdata.spentTime
39
+ return result
40
+ }
41
+
42
+ @objc(setWoosmapApiKey:resolve:reject:)
43
+ func setWoosmapApiKey(apiKey: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
44
+ guard let woosService = WoosmapGeofenceService.shared else {
45
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
46
+ WoosmapGeofenceMessage.woosmapNotInitialized,
47
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
48
+ return
49
+ }
50
+ if apiKey.isEmpty {
51
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
52
+ WoosmapGeofenceMessage.invalidWoosmapKey,
53
+ woosmapError(WoosmapGeofenceMessage.invalidWoosmapKey))
54
+ return
55
+ }
56
+ do {
57
+ try woosService.setWoosmapAPIKey(key: apiKey)
58
+ resolve(WoosmapGeofenceMessage.initialize)
59
+ } catch {
60
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
61
+ error.localizedDescription,
62
+ woosmapError(error.localizedDescription))
63
+ }
64
+ }
65
+
66
+ @objc(setPoiRadius:resolve:reject:)
67
+ func setPoiRadius(radius: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
68
+ guard let woosService = WoosmapGeofenceService.shared else {
69
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
70
+ WoosmapGeofenceMessage.woosmapNotInitialized,
71
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
72
+ return
73
+ }
74
+ var userInputRadiusValue: String = ""
75
+ if let intRadius = Int32(radius) {
76
+ userInputRadiusValue = String(intRadius)
77
+ } else if let doubleRadius = Double(radius) {
78
+ userInputRadiusValue = String(doubleRadius)
79
+ } else {
80
+ userInputRadiusValue = radius
81
+ }
82
+ if userInputRadiusValue.isEmpty {
83
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
84
+ WoosmapGeofenceMessage.invalidPOIRadius,
85
+ woosmapError(WoosmapGeofenceMessage.invalidPOIRadius))
86
+ return
87
+ }
88
+ woosService.setPoiRadius(radius: userInputRadiusValue)
89
+ resolve(WoosmapGeofenceMessage.initialize)
90
+ }
91
+
92
+ @objc(addRegion:resolve:reject:)
93
+ func addRegion(region: NSDictionary, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
94
+ guard let woosService = WoosmapGeofenceService.shared else {
95
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
96
+ WoosmapGeofenceMessage.woosmapNotInitialized,
97
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
98
+ return
99
+ }
100
+ guard let regioninfo = region as? [String: Any], !regioninfo.isEmpty else {
101
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
102
+ WoosmapGeofenceMessage.regionInfoEmptyOrNull,
103
+ woosmapError(WoosmapGeofenceMessage.regionInfoEmptyOrNull))
104
+ return
105
+ }
106
+
107
+ var regionid = UUID().uuidString
108
+ var radius = 100
109
+ var lat: Double = 0
110
+ var lng: Double = 0
111
+ var regiontype = ""
112
+
113
+ if let inputRegionId = regioninfo["regionId"] as? String {
114
+ regionid = inputRegionId
115
+ }
116
+ if let inputCoordinate = regioninfo["lat"] as? String {
117
+ lat = Double(inputCoordinate) ?? 0
118
+ } else if let inputCoordinate = regioninfo["lat"] as? Double {
119
+ lat = inputCoordinate
120
+ }
121
+ if let inputCoordinate = regioninfo["lng"] as? String {
122
+ lng = Double(inputCoordinate) ?? 0
123
+ } else if let inputCoordinate = regioninfo["lng"] as? Double {
124
+ lng = inputCoordinate
125
+ }
126
+ if let inputradius = regioninfo["radius"] as? String {
127
+ radius = Int(inputradius) ?? 0
128
+ } else if let inputradius = regioninfo["radius"] as? Int {
129
+ radius = inputradius
130
+ } else if let inputradius = regioninfo["radius"] as? Double {
131
+ radius = Int(inputradius)
132
+ }
133
+ if let inputtype = regioninfo["type"] as? String {
134
+ regiontype = inputtype
135
+ }
136
+
137
+ if lat == 0 || lng == 0 {
138
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
139
+ WoosmapGeofenceMessage.invalidLocation,
140
+ woosmapError(WoosmapGeofenceMessage.invalidLocation))
141
+ return
142
+ }
143
+ if !(regiontype == "circle" || regiontype == "isochrone") {
144
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
145
+ WoosmapGeofenceMessage.invalidRegionType,
146
+ woosmapError(WoosmapGeofenceMessage.invalidRegionType))
147
+ return
148
+ }
149
+ guard woosService.isSearviceActive() else {
150
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
151
+ WoosmapGeofenceMessage.woosmapProfilNotActivated,
152
+ woosmapError(WoosmapGeofenceMessage.woosmapProfilNotActivated))
153
+ return
154
+ }
155
+
156
+ let coordinate = CLLocationCoordinate2D(latitude: lat, longitude: lng)
157
+ let (regionIsCreated, identifier) = woosService.addRegion(
158
+ identifier: regionid, center: coordinate, radius: radius, type: regiontype)
159
+ if regionIsCreated {
160
+ resolve(identifier)
161
+ } else {
162
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
163
+ WoosmapGeofenceMessage.regionInfoDuplicateID,
164
+ woosmapError(WoosmapGeofenceMessage.regionInfoDuplicateID))
165
+ }
166
+ }
167
+
168
+ @objc(getRegions:resolve:reject:)
169
+ func getRegions(regionId: String?, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
170
+ guard let woosService = WoosmapGeofenceService.shared else {
171
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
172
+ WoosmapGeofenceMessage.woosmapNotInitialized,
173
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
174
+ return
175
+ }
176
+
177
+ // The spec collapses the legacy getAllRegions()/getRegions(id) pair into a
178
+ // single optional-arg method that always resolves an array. A nil/empty id
179
+ // returns the whole collection.
180
+ if let regionId = regionId, !regionId.isEmpty {
181
+ if let captured = woosService.getRegions(id: regionId) {
182
+ resolve([formatRegionData(woosdata: captured)])
183
+ } else {
184
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
185
+ WoosmapGeofenceMessage.notfound_regionid,
186
+ woosmapError(WoosmapGeofenceMessage.notfound_regionid))
187
+ }
188
+ } else {
189
+ let captured = woosService.getRegions()
190
+ resolve(captured.map { formatRegionData(woosdata: $0) })
191
+ }
192
+ }
193
+
194
+ @objc(removeAllRegions:reject:)
195
+ func removeAllRegions(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
196
+ guard let woosService = WoosmapGeofenceService.shared else {
197
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
198
+ WoosmapGeofenceMessage.woosmapNotInitialized,
199
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
200
+ return
201
+ }
202
+ woosService.deleteAllRegion()
203
+ resolve(WoosmapGeofenceMessage.regionDeleted)
204
+ }
205
+
206
+ @objc(removeRegion:resolve:reject:)
207
+ func removeRegion(regionId: String, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
208
+ guard let woosService = WoosmapGeofenceService.shared else {
209
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
210
+ WoosmapGeofenceMessage.woosmapNotInitialized,
211
+ woosmapError(WoosmapGeofenceMessage.woosmapNotInitialized))
212
+ return
213
+ }
214
+ if regionId.isEmpty {
215
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
216
+ WoosmapGeofenceMessage.required_regionid,
217
+ woosmapError(WoosmapGeofenceMessage.required_regionid))
218
+ return
219
+ }
220
+ do {
221
+ try woosService.deleteRegions(id: regionId)
222
+ resolve(WoosmapGeofenceMessage.regionDeleted)
223
+ } catch {
224
+ reject(WoosmapGeofenceMessage.plugin_errorDomain,
225
+ error.localizedDescription,
226
+ woosmapError(error.localizedDescription))
227
+ }
228
+ }
229
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ /**
9
+ * Geofence region payload accepted by {@link Spec.addRegion}.
10
+ *
11
+ * Codegen supports a narrower subset of TypeScript than the public
12
+ * `GeofenceRegion` interface in `internal/types`. String-literal unions
13
+ * (`'circle' | 'isochrone'`) are not expressible in a spec, so `type` is
14
+ * widened to `string` here. The JS facade keeps the strict union for
15
+ * consumers — the widening is internal to the native boundary only.
16
+ */
17
+ /**
18
+ * Region record returned by {@link Spec.getRegions}. Mirrors the native
19
+ * payload shape (lower-cased keys) before the facade maps it onto the
20
+ * `Region` class via `Region.jsonToObj`.
21
+ */
22
+ /**
23
+ * TurboModule spec for the region-CRUD + key/radius slice migrated in
24
+ * Event emitters, background lifecycle and the
25
+ * remaining ~27 methods stay on the legacy `PluginGeofencing` module.
26
+ *
27
+ * The codegen module name is `WoosmapGeofencingTurbo`; the generated spec
28
+ * artifacts are named `WoosmapGeofencingTurboSpec` (see `codegenConfig` in
29
+ * package.json).
30
+ */
31
+ var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('WoosmapGeofencingTurbo');
32
+ //# sourceMappingURL=NativeWoosmapGeofencingTurbo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeWoosmapGeofencingTurbo.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBeC,gCAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _reactNative = require("react-native");
8
8
  var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
9
9
  var _nativeInterface = _interopRequireDefault(require("./internal/nativeInterface"));
10
+ var _NativeWoosmapGeofencingTurbo = _interopRequireDefault(require("./NativeWoosmapGeofencingTurbo"));
10
11
  var _Location = _interopRequireDefault(require("./internal/Location"));
11
12
  var _Region = _interopRequireDefault(require("./internal/Region"));
12
13
  var _Poi = _interopRequireDefault(require("./internal/Poi"));
@@ -37,7 +38,7 @@ function initialize(arg0) {
37
38
  error - A callback function that will be called on error.
38
39
  */
39
40
  function setWoosmapApiKey(apiKey) {
40
- return _nativeInterface.default.setWoosmapApiKey([apiKey]);
41
+ return _NativeWoosmapGeofencingTurbo.default.setWoosmapApiKey(apiKey);
41
42
  }
42
43
 
43
44
  /**
@@ -252,7 +253,7 @@ function setSFMCCredentials(arg0) {
252
253
  * @returns promise with A callback that will be called on success or error.
253
254
  */
254
255
  function setPoiRadius(radius) {
255
- return _nativeInterface.default.setPoiRadius(radius);
256
+ return _NativeWoosmapGeofencingTurbo.default.setPoiRadius(radius);
256
257
  }
257
258
  /**
258
259
  * Adds a custom region that you want to monitor.
@@ -261,7 +262,7 @@ function setPoiRadius(radius) {
261
262
  */
262
263
 
263
264
  function addRegion(region) {
264
- return _nativeInterface.default.addRegion(region);
265
+ return _NativeWoosmapGeofencingTurbo.default.addRegion(region);
265
266
  }
266
267
  /**
267
268
  * Retrieve saved region info
@@ -269,25 +270,9 @@ function addRegion(region) {
269
270
  * @returns promise with A callback that will be called on success or error.
270
271
  */
271
272
  function getRegions(regionID) {
272
- if (regionID == null) {
273
- return _nativeInterface.default.getAllRegions().then(result => {
274
- var formatted = [];
275
- result.forEach(item => {
276
- formatted.push(_Region.default.jsonToObj(item));
277
- });
278
- return Promise.resolve(formatted);
279
- }).catch(e => {
280
- return Promise.reject(e);
281
- });
282
- } else {
283
- return _nativeInterface.default.getRegions(regionID).then(result => {
284
- var formatted = [];
285
- formatted.push(_Region.default.jsonToObj(result));
286
- return Promise.resolve(formatted);
287
- }).catch(e => {
288
- return Promise.reject(e);
289
- });
290
- }
273
+ // The TurboModule collapses the legacy getAllRegions()/getRegions(id) pair
274
+ // into a single optional-arg method that always resolves an array.
275
+ return _NativeWoosmapGeofencingTurbo.default.getRegions(regionID).then(result => result.map(item => _Region.default.jsonToObj(item))).catch(e => Promise.reject(e));
291
276
  }
292
277
 
293
278
  /**
@@ -351,9 +336,9 @@ function getPois(poiID) {
351
336
  */
352
337
  function removeRegions(regionID) {
353
338
  if (regionID == null) {
354
- return _nativeInterface.default.removeAllRegions();
339
+ return _NativeWoosmapGeofencingTurbo.default.removeAllRegions();
355
340
  } else {
356
- return _nativeInterface.default.removeRegion(regionID);
341
+ return _NativeWoosmapGeofencingTurbo.default.removeRegion(regionID);
357
342
  }
358
343
  }
359
344
 
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_reactNativeUuid","_interopRequireDefault","_nativeInterface","_Location","_Region","_Poi","_IndoorBeacon","e","__esModule","default","eventEmitter","NativeEventEmitter","PluginGeofencing","IOS_PROFILES","ANDROID_PROFILES","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","isIOS","Platform","OS","profileToUse","allowed","includes","platformName","Promise","reject","Error","join","stopTracking","requestPermissions","background","requestBLEPermissions","resolve","requestNotificationPermissions","getPermissionsStatus","getBLEPermissionsStatus","getNotificationPermissionsStatus","watchLocation","success","error","watchID","uuid","v1","toString","successCallback","result","Location","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","remove","arg1","undefined","watchRegions","Region","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","catch","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","Poi","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","getIndoorBeacons","venueID","ref","getAllIndoorBeacons","identifier","IndoorBeacon","removeIndoorBeacons","refreshPois","setProtectedRegionSlot","slots","clearProtectedRegionSlot","WoosmapGeofencing","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,OAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,IAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,aAAA,GAAAL,sBAAA,CAAAF,OAAA;AAAmD,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AASnD,MAAMG,YAAY,GAAG,IAAIC,+BAAkB,CAACC,wBAAgB,CAAC;AAC7D,MAAMC,YAAY,GAAG,CACnB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,CACR;AACV,MAAMC,gBAAgB,GAAG,CACvB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,CACR;AAEV,IAAIC,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,IAA+B,EAAmB;EACpE,IAAIA,IAAI,IAAI,IAAI,EAAE;IAChBA,IAAI,GAAG,CAAC,CAAC;EACX;EACA,OAAON,wBAAgB,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kBAAkB;EAClBO,YAAY;EACZE,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVkB,aAAa;EACbT,YAAY;EACZY,eAAe;EACfR,OAAO;EACPU,UAAU;EACVE,mBAAmB;EACnBG,gBAAgB;EAChBM,mBAAmB;EACnBC,WAAW;EACXC,sBAAsB;EACtBE;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAvG,OAAA,GAEaqG,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_reactNativeUuid","_interopRequireDefault","_nativeInterface","_NativeWoosmapGeofencingTurbo","_Location","_Region","_Poi","_IndoorBeacon","e","__esModule","default","eventEmitter","NativeEventEmitter","PluginGeofencing","IOS_PROFILES","ANDROID_PROFILES","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","WoosmapGeofencingTurbo","startTracking","trackingProfile","isIOS","Platform","OS","profileToUse","allowed","includes","platformName","Promise","reject","Error","join","stopTracking","requestPermissions","background","requestBLEPermissions","resolve","requestNotificationPermissions","getPermissionsStatus","getBLEPermissionsStatus","getNotificationPermissionsStatus","watchLocation","success","error","watchID","uuid","v1","toString","successCallback","result","Location","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","remove","arg1","undefined","watchRegions","Region","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","then","map","item","catch","getLocations","locationID","getAllLocations","formatted","forEach","push","getLocation","getPois","poiID","getAllPois","Poi","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","getIndoorBeacons","venueID","ref","getAllIndoorBeacons","identifier","IndoorBeacon","removeIndoorBeacons","refreshPois","setProtectedRegionSlot","slots","clearProtectedRegionSlot","WoosmapGeofencing","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA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IAAK;MAC9BA,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA,SAASuE,wBAAwBA,CAAA,EAAoB;EACnD,OAAOF,sBAAsB,CAAC,CAAC,CAAC;AAClC;AAcA,MAAMG,iBAAiB,GAAG;EACxB9F,UAAU;EACVE,gBAAgB;EAChBG,aAAa;EACbc,kBAAkB;EAClBE,qBAAqB;EACrBE,8BAA8B;EAC9BC,oBAAoB;EACpBC,uBAAuB;EACvBC,gCAAgC;EAChCR,YAAY;EACZS,aAAa;EACbY,kBAAkB;EAClBO,YAAY;EACZE,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVkB,aAAa;EACbZ,YAAY;EACZe,eAAe;EACfR,OAAO;EACPU,UAAU;EACVE,mBAAmB;EACnBG,gBAAgB;EAChBM,mBAAmB;EACnBC,WAAW;EACXC,sBAAsB;EACtBE;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAxG,OAAA,GAEasG,iBAAiB","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { TurboModuleRegistry } from 'react-native';
4
+
5
+ /**
6
+ * Geofence region payload accepted by {@link Spec.addRegion}.
7
+ *
8
+ * Codegen supports a narrower subset of TypeScript than the public
9
+ * `GeofenceRegion` interface in `internal/types`. String-literal unions
10
+ * (`'circle' | 'isochrone'`) are not expressible in a spec, so `type` is
11
+ * widened to `string` here. The JS facade keeps the strict union for
12
+ * consumers — the widening is internal to the native boundary only.
13
+ */
14
+
15
+ /**
16
+ * Region record returned by {@link Spec.getRegions}. Mirrors the native
17
+ * payload shape (lower-cased keys) before the facade maps it onto the
18
+ * `Region` class via `Region.jsonToObj`.
19
+ */
20
+
21
+ /**
22
+ * TurboModule spec for the region-CRUD + key/radius slice migrated in
23
+ * Event emitters, background lifecycle and the
24
+ * remaining ~27 methods stay on the legacy `PluginGeofencing` module.
25
+ *
26
+ * The codegen module name is `WoosmapGeofencingTurbo`; the generated spec
27
+ * artifacts are named `WoosmapGeofencingTurboSpec` (see `codegenConfig` in
28
+ * package.json).
29
+ */
30
+
31
+ export default TurboModuleRegistry.getEnforcing('WoosmapGeofencingTurbo');
32
+ //# sourceMappingURL=NativeWoosmapGeofencingTurbo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeWoosmapGeofencingTurbo.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,wBAAwB,CAAC","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  import { NativeEventEmitter, Platform } from 'react-native';
4
4
  import uuid from 'react-native-uuid';
5
5
  import PluginGeofencing from './internal/nativeInterface';
6
+ import WoosmapGeofencingTurbo from './NativeWoosmapGeofencingTurbo';
6
7
  import Location from './internal/Location';
7
8
  import Region from './internal/Region';
8
9
  import Poi from './internal/Poi';
@@ -32,7 +33,7 @@ function initialize(arg0) {
32
33
  error - A callback function that will be called on error.
33
34
  */
34
35
  function setWoosmapApiKey(apiKey) {
35
- return PluginGeofencing.setWoosmapApiKey([apiKey]);
36
+ return WoosmapGeofencingTurbo.setWoosmapApiKey(apiKey);
36
37
  }
37
38
 
38
39
  /**
@@ -247,7 +248,7 @@ function setSFMCCredentials(arg0) {
247
248
  * @returns promise with A callback that will be called on success or error.
248
249
  */
249
250
  function setPoiRadius(radius) {
250
- return PluginGeofencing.setPoiRadius(radius);
251
+ return WoosmapGeofencingTurbo.setPoiRadius(radius);
251
252
  }
252
253
  /**
253
254
  * Adds a custom region that you want to monitor.
@@ -256,7 +257,7 @@ function setPoiRadius(radius) {
256
257
  */
257
258
 
258
259
  function addRegion(region) {
259
- return PluginGeofencing.addRegion(region);
260
+ return WoosmapGeofencingTurbo.addRegion(region);
260
261
  }
261
262
  /**
262
263
  * Retrieve saved region info
@@ -264,25 +265,9 @@ function addRegion(region) {
264
265
  * @returns promise with A callback that will be called on success or error.
265
266
  */
266
267
  function getRegions(regionID) {
267
- if (regionID == null) {
268
- return PluginGeofencing.getAllRegions().then(result => {
269
- var formatted = [];
270
- result.forEach(item => {
271
- formatted.push(Region.jsonToObj(item));
272
- });
273
- return Promise.resolve(formatted);
274
- }).catch(e => {
275
- return Promise.reject(e);
276
- });
277
- } else {
278
- return PluginGeofencing.getRegions(regionID).then(result => {
279
- var formatted = [];
280
- formatted.push(Region.jsonToObj(result));
281
- return Promise.resolve(formatted);
282
- }).catch(e => {
283
- return Promise.reject(e);
284
- });
285
- }
268
+ // The TurboModule collapses the legacy getAllRegions()/getRegions(id) pair
269
+ // into a single optional-arg method that always resolves an array.
270
+ return WoosmapGeofencingTurbo.getRegions(regionID).then(result => result.map(item => Region.jsonToObj(item))).catch(e => Promise.reject(e));
286
271
  }
287
272
 
288
273
  /**
@@ -346,9 +331,9 @@ function getPois(poiID) {
346
331
  */
347
332
  function removeRegions(regionID) {
348
333
  if (regionID == null) {
349
- return PluginGeofencing.removeAllRegions();
334
+ return WoosmapGeofencingTurbo.removeAllRegions();
350
335
  } else {
351
- return PluginGeofencing.removeRegion(regionID);
336
+ return WoosmapGeofencingTurbo.removeRegion(regionID);
352
337
  }
353
338
  }
354
339
 
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","Platform","uuid","PluginGeofencing","Location","Region","Poi","IndoorBeacon","eventEmitter","IOS_PROFILES","ANDROID_PROFILES","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","isIOS","OS","profileToUse","allowed","includes","platformName","Promise","reject","Error","join","stopTracking","requestPermissions","background","requestBLEPermissions","resolve","requestNotificationPermissions","getPermissionsStatus","getBLEPermissionsStatus","getNotificationPermissionsStatus","watchLocation","success","error","watchID","v1","toString","successCallback","result","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","remove","arg1","undefined","watchRegions","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","getAllRegions","then","formatted","forEach","item","push","catch","e","getLocations","locationID","getAllLocations","getLocation","getPois","poiID","getAllPois","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","getIndoorBeacons","venueID","ref","getAllIndoorBeacons","identifier","removeIndoorBeacons","refreshPois","setProtectedRegionSlot","slots","clearProtectedRegionSlot","WoosmapGeofencing"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,YAAY,MAAM,yBAAyB;AASlD,MAAMC,YAAY,GAAG,IAAIR,kBAAkB,CAACG,gBAAgB,CAAC;AAC7D,MAAMM,YAAY,GAAG,CACnB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,CACR;AACV,MAAMC,gBAAgB,GAAG,CACvB,cAAc,EACd,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,CACR;AAEV,IAAIC,qBAA0B,GAAG,CAAC,CAAC;AACnC,IAAIC,mBAAwB,GAAG,CAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CAACC,IAA+B,EAAmB;EACpE,IAAIA,IAAI,IAAI,IAAI,EAAE;IAChBA,IAAI,GAAG,CAAC,CAAC;EACX;EACA,OAAOX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a;EACbU,kBAAkB;EAClBO,YAAY;EACZC,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVkB,aAAa;EACbR,YAAY;EACZW,eAAe;EACfP,OAAO;EACPS,UAAU;EACVE,mBAAmB;EACnBG,gBAAgB;EAChBK,mBAAmB;EACnBC,WAAW;EACXC,sBAAsB;EACtBE;AACF,CAAC;AAED,eAAeC,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["NativeEventEmitter","Platform","uuid","PluginGeofencing","WoosmapGeofencingTurbo","Location","Region","Poi","IndoorBeacon","eventEmitter","IOS_PROFILES","ANDROID_PROFILES","subscriptionsLocation","subscriptionsRegion","initialize","arg0","setWoosmapApiKey","apiKey","startTracking","trackingProfile","isIOS","OS","profileToUse","allowed","includes","platformName","Promise","reject","Error","join","stopTracking","requestPermissions","background","requestBLEPermissions","resolve","requestNotificationPermissions","getPermissionsStatus","getBLEPermissionsStatus","getNotificationPermissionsStatus","watchLocation","success","error","watchID","v1","toString","successCallback","result","jsonToObj","addListener","clearLocationWatch","removeAllListeners","clearAllLocationWatch","saved","remove","arg1","undefined","watchRegions","clearRegionsWatch","clearAllRegionsWatch","setSFMCCredentials","setPoiRadius","radius","addRegion","region","getRegions","regionID","then","map","item","catch","e","getLocations","locationID","getAllLocations","formatted","forEach","push","getLocation","getPois","poiID","getAllPois","getPoi","removeRegions","removeAllRegions","removeRegion","removeLocations","removeAllLocations","removePois","removeAllPois","startCustomTracking","sourceType","source","getIndoorBeacons","venueID","ref","getAllIndoorBeacons","identifier","removeIndoorBeacons","refreshPois","setProtectedRegionSlot","slots","clearProtectedRegionSlot","WoosmapGeofencing"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAOC,gBAAgB,MAAM,4BAA4B;AACzD,OAAOC,sBAAsB,MAAM,gCAAgC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ChCR,YAAY;EACZS,aAAa;EACbU,kBAAkB;EAClBO,YAAY;EACZC,iBAAiB;EACjBE,kBAAkB;EAClBC,YAAY;EACZE,SAAS;EACTE,UAAU;EACVkB,aAAa;EACbX,YAAY;EACZc,eAAe;EACfP,OAAO;EACPS,UAAU;EACVE,mBAAmB;EACnBG,gBAAgB;EAChBK,mBAAmB;EACnBC,WAAW;EACXC,sBAAsB;EACtBE;AACF,CAAC;AAED,eAAeC,iBAAiB","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ import type { TurboModule } from 'react-native';
2
+ /**
3
+ * Geofence region payload accepted by {@link Spec.addRegion}.
4
+ *
5
+ * Codegen supports a narrower subset of TypeScript than the public
6
+ * `GeofenceRegion` interface in `internal/types`. String-literal unions
7
+ * (`'circle' | 'isochrone'`) are not expressible in a spec, so `type` is
8
+ * widened to `string` here. The JS facade keeps the strict union for
9
+ * consumers — the widening is internal to the native boundary only.
10
+ */
11
+ export type GeofenceRegionInput = {
12
+ regionId: string;
13
+ lat: number;
14
+ lng: number;
15
+ radius: number;
16
+ type: string;
17
+ };
18
+ /**
19
+ * Region record returned by {@link Spec.getRegions}. Mirrors the native
20
+ * payload shape (lower-cased keys) before the facade maps it onto the
21
+ * `Region` class via `Region.jsonToObj`.
22
+ */
23
+ export type RegionRecord = {
24
+ date: number;
25
+ didenter: boolean;
26
+ identifier: string;
27
+ latitude: number;
28
+ longitude: number;
29
+ radius: number;
30
+ frompositiondetection: boolean;
31
+ eventname: string;
32
+ spenttime: number;
33
+ };
34
+ /**
35
+ * TurboModule spec for the region-CRUD + key/radius slice migrated in
36
+ * Event emitters, background lifecycle and the
37
+ * remaining ~27 methods stay on the legacy `PluginGeofencing` module.
38
+ *
39
+ * The codegen module name is `WoosmapGeofencingTurbo`; the generated spec
40
+ * artifacts are named `WoosmapGeofencingTurboSpec` (see `codegenConfig` in
41
+ * package.json).
42
+ */
43
+ export interface Spec extends TurboModule {
44
+ addRegion(region: GeofenceRegionInput): Promise<string>;
45
+ removeRegion(regionId: string): Promise<string>;
46
+ removeAllRegions(): Promise<string>;
47
+ getRegions(regionId?: string): Promise<RegionRecord[]>;
48
+ setPoiRadius(radius: string): Promise<string>;
49
+ setWoosmapApiKey(apiKey: string): Promise<string>;
50
+ }
51
+ declare const _default: Spec;
52
+ export default _default;
53
+ //# sourceMappingURL=NativeWoosmapGeofencingTurbo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeWoosmapGeofencingTurbo.d.ts","sourceRoot":"","sources":["../../../src/NativeWoosmapGeofencingTurbo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,SAAS,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,UAAU,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ACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CACvB,OAAO,CAAC,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,EAAE,CAAC,CAsCzB;AAED;;;GAGG;AACH,iBAAS,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAE9C;AAED;;;GAGG;AACH,iBAAS,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAEtC;AAED;;;;GAIG;AACH,iBAAS,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ9D;AAED;;;GAGG;AACH,iBAAS,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnD;AAED,YAAY,EACV,UAAU,EACV,cAAc,EACd,MAAM,EACN,QAAQ,EACR,GAAG,EACH,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,eAAe,GAChB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/react-native-plugin-geofencing",
3
- "version": "0.14.0",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "This react-native plugin extends the functionality offered by the Woosmap Geofencing Mobile SDKs. Find more about the Woosmap Geofencing SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -42,11 +42,20 @@
42
42
  "publishConfig": {
43
43
  "registry": "https://registry.npmjs.org/"
44
44
  },
45
+ "codegenConfig": {
46
+ "name": "WoosmapGeofencingTurboSpec",
47
+ "type": "modules",
48
+ "jsSrcsDir": "src",
49
+ "android": {
50
+ "javaPackageName": "com.woosmap.reactnativeplugingeofencing"
51
+ }
52
+ },
45
53
  "devDependencies": {
46
54
  "@commitlint/config-conventional": "^17.0.2",
47
55
  "@evilmartians/lefthook": "^1.5.0",
48
56
  "@react-native-community/cli": "20.0.0",
49
57
  "@react-native/eslint-config": "^0.85.0",
58
+ "@react-native/jest-preset": "0.85.0",
50
59
  "@types/jest": "^29.5.5",
51
60
  "@types/react": "^19.1.0",
52
61
  "commitlint": "^17.0.2",
@@ -18,6 +18,9 @@ Pod::Spec.new do |s|
18
18
 
19
19
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
20
20
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
21
+ # On the New Architecture this also wires the codegen build phase that emits the
22
+ # `WoosmapGeofencingTurboSpec` artifacts (RCTNativeWoosmapGeofencingTurboSpec protocol +
23
+ # NativeWoosmapGeofencingTurboSpecJSI) consumed by ios/WoosmapGeofencingTurbo.{swift,mm}.
21
24
  if respond_to?(:install_modules_dependencies, true)
22
25
  install_modules_dependencies(s)
23
26
  else