react-native-radar 3.10.7 → 3.10.9
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/android/build.gradle +3 -2
- package/android/src/main/java/io/radar/react/RNRadarModule.java +6 -5
- package/dist/package.json +1 -1
- package/dist/src/@types/types.d.ts +2 -0
- package/ios/Cartfile.resolved +1 -1
- package/ios/RNRadar.m +14 -8
- package/package.json +1 -1
- package/react-native-radar.podspec +1 -1
- package/src/@types/types.ts +2 -0
package/android/build.gradle
CHANGED
|
@@ -18,7 +18,7 @@ android {
|
|
|
18
18
|
minSdkVersion 16
|
|
19
19
|
targetSdkVersion 31
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName '3.10.
|
|
21
|
+
versionName '3.10.9'
|
|
22
22
|
}
|
|
23
23
|
lintOptions {
|
|
24
24
|
abortOnError false
|
|
@@ -45,5 +45,6 @@ repositories {
|
|
|
45
45
|
|
|
46
46
|
dependencies {
|
|
47
47
|
api 'com.facebook.react:react-native:+'
|
|
48
|
-
api 'io.radar:sdk:3.
|
|
48
|
+
api 'io.radar:sdk:3.10.0'
|
|
49
49
|
}
|
|
50
|
+
|
|
@@ -95,7 +95,7 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
95
95
|
this.fraud = fraud;
|
|
96
96
|
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
97
97
|
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
98
|
-
editor.putString("x_platform_sdk_version", "3.10.
|
|
98
|
+
editor.putString("x_platform_sdk_version", "3.10.9");
|
|
99
99
|
editor.apply();
|
|
100
100
|
if (fraud) {
|
|
101
101
|
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
|
|
@@ -926,7 +926,7 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
926
926
|
near.setLatitude(latitude);
|
|
927
927
|
near.setLongitude(longitude);
|
|
928
928
|
}
|
|
929
|
-
|
|
929
|
+
Integer radius = optionsMap.hasKey("radius") ? optionsMap.getInt("radius") : null;
|
|
930
930
|
String[] tags = optionsMap.hasKey("tags") ? RNRadarUtils.stringArrayForArray(optionsMap.getArray("tags")) : null;
|
|
931
931
|
JSONObject metadata = null;
|
|
932
932
|
if (optionsMap.hasKey("metadata")) {
|
|
@@ -940,7 +940,8 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
-
int limit = optionsMap.hasKey("limit") ? optionsMap.getInt("limit") :
|
|
943
|
+
int limit = optionsMap.hasKey("limit") ? optionsMap.getInt("limit") : 100;
|
|
944
|
+
boolean includeGeometry = optionsMap.hasKey("includeGeometry") ? optionsMap.getBoolean("includeGeometry") : false;
|
|
944
945
|
|
|
945
946
|
Radar.RadarSearchGeofencesCallback callback = new Radar.RadarSearchGeofencesCallback() {
|
|
946
947
|
@Override
|
|
@@ -967,9 +968,9 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
967
968
|
};
|
|
968
969
|
|
|
969
970
|
if (near != null) {
|
|
970
|
-
Radar.searchGeofences(near, radius, tags, metadata, limit, callback);
|
|
971
|
+
Radar.searchGeofences(near, radius, tags, metadata, limit, includeGeometry, callback);
|
|
971
972
|
} else {
|
|
972
|
-
Radar.searchGeofences(radius, tags, metadata, limit, callback);
|
|
973
|
+
Radar.searchGeofences(radius, tags, metadata, limit, includeGeometry, callback);
|
|
973
974
|
}
|
|
974
975
|
}
|
|
975
976
|
|
package/dist/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
|
|
4
4
|
"homepage": "https://radar.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "3.10.
|
|
6
|
+
"version": "3.10.9",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"android",
|
|
@@ -83,6 +83,7 @@ export interface RadarSearchGeofencesOptions {
|
|
|
83
83
|
metadata?: RadarMetadata;
|
|
84
84
|
tags?: string[];
|
|
85
85
|
limit?: number;
|
|
86
|
+
includeGeometry: boolean;
|
|
86
87
|
}
|
|
87
88
|
export interface RadarTrackingOptionsForegroundServiceOptions {
|
|
88
89
|
text?: string;
|
|
@@ -368,6 +369,7 @@ export interface RadarPlace {
|
|
|
368
369
|
location: Location;
|
|
369
370
|
metadata?: RadarMetadata;
|
|
370
371
|
group?: string;
|
|
372
|
+
address?: RadarAddress;
|
|
371
373
|
}
|
|
372
374
|
export interface RadarChain {
|
|
373
375
|
name: string;
|
package/ios/Cartfile.resolved
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
github "radarlabs/radar-sdk-ios" "3.
|
|
1
|
+
github "radarlabs/radar-sdk-ios" "3.10.1"
|
package/ios/RNRadar.m
CHANGED
|
@@ -100,7 +100,7 @@ RCT_EXPORT_MODULE();
|
|
|
100
100
|
|
|
101
101
|
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
|
|
102
102
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
103
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"3.10.
|
|
103
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"3.10.9" forKey:@"radar-xPlatformSDKVersion"];
|
|
104
104
|
[Radar initializeWithPublishableKey:publishableKey];
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -768,7 +768,7 @@ RCT_EXPORT_METHOD(searchGeofences:(NSDictionary *)optionsDict resolve:(RCTPromis
|
|
|
768
768
|
if (radiusNumber != nil && [radiusNumber isKindOfClass:[NSNumber class]]) {
|
|
769
769
|
radius = [radiusNumber intValue];
|
|
770
770
|
} else {
|
|
771
|
-
radius =
|
|
771
|
+
radius = -1;
|
|
772
772
|
}
|
|
773
773
|
NSArray *tags = optionsDict[@"tags"];
|
|
774
774
|
NSDictionary *metadata = optionsDict[@"metadata"];
|
|
@@ -777,8 +777,16 @@ RCT_EXPORT_METHOD(searchGeofences:(NSDictionary *)optionsDict resolve:(RCTPromis
|
|
|
777
777
|
if (limitNumber != nil && [limitNumber isKindOfClass:[NSNumber class]]) {
|
|
778
778
|
limit = [limitNumber intValue];
|
|
779
779
|
} else {
|
|
780
|
-
limit =
|
|
780
|
+
limit = 100;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
BOOL includeGeometry = NO;
|
|
784
|
+
|
|
785
|
+
NSNumber *includeGeometryNumber = optionsDict[@"includeGeometry"];
|
|
786
|
+
if (includeGeometryNumber != nil && [includeGeometryNumber isKindOfClass:[NSNumber class]]) {
|
|
787
|
+
includeGeometry = [includeGeometryNumber boolValue];
|
|
781
788
|
}
|
|
789
|
+
|
|
782
790
|
|
|
783
791
|
__block RCTPromiseResolveBlock resolver = resolve;
|
|
784
792
|
__block RCTPromiseRejectBlock rejecter = reject;
|
|
@@ -801,11 +809,9 @@ RCT_EXPORT_METHOD(searchGeofences:(NSDictionary *)optionsDict resolve:(RCTPromis
|
|
|
801
809
|
rejecter = nil;
|
|
802
810
|
};
|
|
803
811
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
[Radar searchGeofencesWithRadius:radius tags:tags metadata:metadata limit:limit completionHandler:completionHandler];
|
|
808
|
-
}
|
|
812
|
+
|
|
813
|
+
[Radar searchGeofencesNear:near radius:radius tags:tags metadata:metadata limit:limit includeGeometry:includeGeometry completionHandler:completionHandler];
|
|
814
|
+
|
|
809
815
|
}
|
|
810
816
|
|
|
811
817
|
RCT_EXPORT_METHOD(autocomplete:(NSDictionary *)optionsDict resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React Native module for Radar, the leading geofencing and location tracking platform",
|
|
4
4
|
"homepage": "https://radar.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "3.10.
|
|
6
|
+
"version": "3.10.9",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"android",
|
package/src/@types/types.ts
CHANGED
|
@@ -230,6 +230,7 @@ export interface RadarSearchGeofencesOptions {
|
|
|
230
230
|
metadata?: RadarMetadata;
|
|
231
231
|
tags?: string[];
|
|
232
232
|
limit?: number;
|
|
233
|
+
includeGeometry: boolean;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
export interface RadarTrackingOptionsForegroundServiceOptions {
|
|
@@ -628,6 +629,7 @@ export interface RadarPlace {
|
|
|
628
629
|
location: Location;
|
|
629
630
|
metadata?: RadarMetadata;
|
|
630
631
|
group?: string;
|
|
632
|
+
address?: RadarAddress;
|
|
631
633
|
}
|
|
632
634
|
|
|
633
635
|
export interface RadarChain {
|