@woosmap/react-native-plugin-geofencing 0.13.1 → 0.14.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/CHANGELOG.md +7 -0
- package/README.md +16 -0
- package/android/build.gradle +3 -3
- package/android/gradle.properties +5 -5
- package/android/src/main/java/com/reactnativeplugingeofencing/PluginGeofencingModule.java +0 -8
- package/ios/PluginGeofencing.mm +0 -4
- package/ios/PluginGeofencing.swift +0 -6
- package/ios/WoosmapGeofenceService.swift +21 -4
- package/package.json +8 -8
- package/react-native-plugin-geofencing.podspec +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 0.14.0
|
|
2
|
+
- Breaking: Raised minimum supported React Native to `0.85.x`; React `19.2.3`.
|
|
3
|
+
- Breaking: Android requires JDK 17, Kotlin `2.1.x`, AGP `8.10.x`, Gradle `8.14.x`, `compileSdk`/`targetSdk` `36`.
|
|
4
|
+
- Breaking: Node.js `>=22` required by the app toolchain.
|
|
5
|
+
## 0.13.2
|
|
6
|
+
- Patch: Internal refinement
|
|
7
|
+
|
|
1
8
|
## 0.13.1
|
|
2
9
|
- Patch: Remove deprecation warnings in the Android plugin.
|
|
3
10
|
## 0.13.0
|
package/README.md
CHANGED
|
@@ -12,3 +12,19 @@ The SDK simplifies the integration of the location context in your mobile applic
|
|
|
12
12
|
All feature descriptions and guides to implement the Woosmap Geofencing Android & iOS SDK are available on the [Woosmap developers documentation](https://developers.woosmap.com/products/geofencing-sdk/get-started/).
|
|
13
13
|
|
|
14
14
|
If you are looking for the Woosmap Geofencing React Native plugin documentation, [we have a dedicated section for it](https://developers.woosmap.com/products/geofencing-sdk/react-native-plugin/guides/setup/).
|
|
15
|
+
|
|
16
|
+
### Requirements
|
|
17
|
+
|
|
18
|
+
- React Native `>=0.85.0` and React `>=19.2.3`
|
|
19
|
+
- iOS `>=15.1`
|
|
20
|
+
- Android: JDK 17, `minSdk` 24, `compileSdk`/`targetSdk` 36
|
|
21
|
+
- Node.js `>=22`
|
|
22
|
+
|
|
23
|
+
### React Native architectures
|
|
24
|
+
|
|
25
|
+
This release supports both the legacy bridge and the New Architecture (Fabric / TurboModules):
|
|
26
|
+
|
|
27
|
+
- **Legacy bridge** (`newArchEnabled=false` on Android, `RCT_NEW_ARCH_ENABLED=0` on iOS): the plugin is loaded natively as before.
|
|
28
|
+
- **New Architecture** (`newArchEnabled=true` / `RCT_NEW_ARCH_ENABLED=1`): the plugin is loaded through React Native's **interop layer**. No additional setup is required in your app — the plugin's native modules and event emitters are automatically wrapped as TurboModule-compatible instances at runtime.
|
|
29
|
+
|
|
30
|
+
A full TurboModule / Fabric-native rewrite is planned for a future major release. Until then, consumer apps can opt into the New Architecture without any changes to how they consume this plugin.
|
package/android/build.gradle
CHANGED
|
@@ -5,7 +5,7 @@ buildscript {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
dependencies {
|
|
8
|
-
classpath "com.android.tools.build:gradle:8.
|
|
8
|
+
classpath "com.android.tools.build:gradle:8.10.0"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -66,8 +66,8 @@ android {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
compileOptions {
|
|
69
|
-
sourceCompatibility JavaVersion.
|
|
70
|
-
targetCompatibility JavaVersion.
|
|
69
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
70
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
PluginGeofencing_kotlinVersion=1.
|
|
2
|
-
PluginGeofencing_minSdkVersion=
|
|
3
|
-
PluginGeofencing_targetSdkVersion=
|
|
4
|
-
PluginGeofencing_compileSdkVersion=
|
|
5
|
-
PluginGeofencing_ndkversion=
|
|
1
|
+
PluginGeofencing_kotlinVersion=2.1.20
|
|
2
|
+
PluginGeofencing_minSdkVersion=24
|
|
3
|
+
PluginGeofencing_targetSdkVersion=36
|
|
4
|
+
PluginGeofencing_compileSdkVersion=36
|
|
5
|
+
PluginGeofencing_ndkversion=27.1.12297006
|
|
@@ -70,14 +70,6 @@ public class PluginGeofencingModule extends ReactContextBaseJavaModule implement
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
// Example method
|
|
74
|
-
// See https://reactnative.dev/docs/native-modules-android
|
|
75
|
-
@ReactMethod
|
|
76
|
-
public void multiply(int a, int b, Promise promise) {
|
|
77
|
-
promise.resolve(a * b);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
73
|
/***
|
|
82
74
|
* Initializes Woosmap object with given parameters.
|
|
83
75
|
* @param map ReadableMap may contain privateKeyWoosmapAPI with Woosmap API key,
|
package/ios/PluginGeofencing.mm
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
@interface RCT_EXTERN_MODULE(PluginGeofencing, NSObject)
|
|
4
4
|
|
|
5
|
-
RCT_EXTERN_METHOD(multiply:(float)a withB:(float)b
|
|
6
|
-
withResolver:(RCTPromiseResolveBlock)resolve
|
|
7
|
-
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
8
|
-
|
|
9
5
|
RCT_EXTERN_METHOD(initialize:(NSDictionary *)options
|
|
10
6
|
withResolver:(RCTPromiseResolveBlock)resolve
|
|
11
7
|
withRejecter:(RCTPromiseRejectBlock)reject)
|
|
@@ -69,12 +69,6 @@ class PluginGeofencing: RCTEventEmitter {
|
|
|
69
69
|
return resultError
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
@objc(multiply:withB:withResolver:withRejecter:)
|
|
73
|
-
func multiply(a: Float, b: Float, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void {
|
|
74
|
-
resolve(a*b)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
72
|
@objc(initialize:withResolver:withRejecter:)
|
|
79
73
|
func initialize(command: NSDictionary, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void{
|
|
80
74
|
|
|
@@ -247,8 +247,12 @@ extension CLRegion {
|
|
|
247
247
|
airshipTrackingEnable: Bool = false,
|
|
248
248
|
protectedRegionSlot: Int = -1
|
|
249
249
|
) {
|
|
250
|
-
//
|
|
251
|
-
|
|
250
|
+
// Initialize synchronously so the native module's `initialize` promise
|
|
251
|
+
// does not resolve before `_shared` has actually been assigned.
|
|
252
|
+
// Native module methods run on a background dispatch queue, so we hop to
|
|
253
|
+
// the main thread (where `WoosmapGeofenceService.init` is MainActor-isolated)
|
|
254
|
+
// and block until the assignment completes.
|
|
255
|
+
runOnMainSync {
|
|
252
256
|
_shared = WoosmapGeofenceService.init(
|
|
253
257
|
woosmapKey,
|
|
254
258
|
configurationProfile,
|
|
@@ -260,12 +264,25 @@ extension CLRegion {
|
|
|
260
264
|
|
|
261
265
|
/// Creating instance for woosGeofencing service
|
|
262
266
|
@objc public static func setup() {
|
|
263
|
-
|
|
264
|
-
Task { @MainActor in
|
|
267
|
+
runOnMainSync {
|
|
265
268
|
_shared = WoosmapGeofenceService.init("", "")
|
|
266
269
|
}
|
|
267
270
|
}
|
|
268
271
|
|
|
272
|
+
/// Runs the given MainActor-isolated work synchronously, dispatching to the
|
|
273
|
+
/// main thread when called from a background queue. Safe to call from either
|
|
274
|
+
/// the main thread or any other thread — avoids the `DispatchQueue.main.sync`
|
|
275
|
+
/// deadlock when already on main.
|
|
276
|
+
private static func runOnMainSync(_ work: @MainActor () -> Void) {
|
|
277
|
+
if Thread.isMainThread {
|
|
278
|
+
MainActor.assumeIsolated { work() }
|
|
279
|
+
} else {
|
|
280
|
+
DispatchQueue.main.sync {
|
|
281
|
+
MainActor.assumeIsolated { work() }
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
269
286
|
/// Setting up woosmap key
|
|
270
287
|
/// - Parameter key: woosmap key
|
|
271
288
|
/// - Throws: WoosGeofenceError incase of no key pass or empty
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@woosmap/react-native-plugin-geofencing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
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",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@commitlint/config-conventional": "^17.0.2",
|
|
47
47
|
"@evilmartians/lefthook": "^1.5.0",
|
|
48
|
-
"@react-native-community/cli": "
|
|
49
|
-
"@react-native/eslint-config": "^0.
|
|
48
|
+
"@react-native-community/cli": "20.0.0",
|
|
49
|
+
"@react-native/eslint-config": "^0.85.0",
|
|
50
50
|
"@types/jest": "^29.5.5",
|
|
51
51
|
"@types/react": "^19.1.0",
|
|
52
52
|
"commitlint": "^17.0.2",
|
|
@@ -56,18 +56,18 @@
|
|
|
56
56
|
"eslint-plugin-prettier": "5.0.1",
|
|
57
57
|
"jest": "^29.7.0",
|
|
58
58
|
"prettier": "3.0.3",
|
|
59
|
-
"react": "19.
|
|
60
|
-
"react-native": "0.
|
|
59
|
+
"react": "19.2.3",
|
|
60
|
+
"react-native": "0.85.0",
|
|
61
61
|
"react-native-builder-bob": "^0.40.12",
|
|
62
62
|
"turbo": "^1.10.7",
|
|
63
63
|
"typescript": "^5.2.2"
|
|
64
64
|
},
|
|
65
65
|
"resolutions": {
|
|
66
|
-
"@types/react": "^
|
|
66
|
+
"@types/react": "^19.1.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"react": "
|
|
70
|
-
"react-native": "
|
|
69
|
+
"react": ">=19.2.3",
|
|
70
|
+
"react-native": ">=0.85.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"react-native-uuid": "^2.0.3"
|
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.license = package["license"]
|
|
12
12
|
s.authors = package["author"]
|
|
13
13
|
|
|
14
|
-
s.platforms = { :ios => "15.
|
|
14
|
+
s.platforms = { :ios => "15.1" }
|
|
15
15
|
s.source = { :git => "https://github.com/Woosmap/geofencing-react-native-plugin.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|