react-native-radar 3.18.5-beta.4 → 3.19.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/android/build.gradle +3 -2
- package/android/src/main/java/io/radar/react/RNRadarModule.java +11 -1
- package/dist/@types/RadarNativeInterface.d.ts +2 -0
- package/dist/@types/types.d.ts +1 -0
- package/dist/index.native.js +4 -0
- package/dist/index.web.d.ts +4 -0
- package/dist/index.web.js +10 -0
- package/ios/Cartfile.resolved +1 -1
- package/ios/RNRadar.m +9 -1
- package/package.json +1 -1
- package/plugin/build/types.d.ts +1 -0
- package/plugin/build/withRadarAndroid.js +1 -0
- package/plugin/build/withRadarIOS.js +28 -2
- package/react-native-radar.podspec +2 -2
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.18.5
|
|
21
|
+
versionName '3.18.5'
|
|
22
22
|
}
|
|
23
23
|
lintOptions {
|
|
24
24
|
abortOnError false
|
|
@@ -45,6 +45,7 @@ repositories {
|
|
|
45
45
|
|
|
46
46
|
dependencies {
|
|
47
47
|
api 'com.facebook.react:react-native:+'
|
|
48
|
-
api '
|
|
48
|
+
api 'org.nanohttpd:nanohttpd:2.3.1'
|
|
49
|
+
api 'io.radar:sdk:3.18.8-beta.1'
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -96,7 +96,7 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
96
96
|
this.fraud = fraud;
|
|
97
97
|
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
98
98
|
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
99
|
-
editor.putString("x_platform_sdk_version", "3.18.5
|
|
99
|
+
editor.putString("x_platform_sdk_version", "3.18.5");
|
|
100
100
|
editor.apply();
|
|
101
101
|
if (fraud) {
|
|
102
102
|
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
|
|
@@ -448,6 +448,16 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
|
|
|
448
448
|
Radar.getVerifiedLocationToken(trackCallback);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
+
@ReactMethod
|
|
452
|
+
public void startVerifyServer() {
|
|
453
|
+
Radar.startVerifyServer();
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@ReactMethod
|
|
457
|
+
public void stopVerifyServer() {
|
|
458
|
+
Radar.stopVerifyServer();
|
|
459
|
+
}
|
|
460
|
+
|
|
451
461
|
@ReactMethod
|
|
452
462
|
public void startTrackingEfficient() {
|
|
453
463
|
Radar.startTracking(RadarTrackingOptions.EFFICIENT);
|
|
@@ -15,6 +15,8 @@ export interface RadarNativeInterface {
|
|
|
15
15
|
trackOnce: (options?: RadarTrackOnceOptions | Location) => Promise<RadarTrackCallback>;
|
|
16
16
|
trackVerified: (options?: RadarTrackVerifiedOptions) => Promise<RadarTrackVerifiedCallback>;
|
|
17
17
|
getVerifiedLocationToken: () => Promise<RadarTrackVerifiedCallback>;
|
|
18
|
+
startVerifyServer: () => void;
|
|
19
|
+
stopVerifyServer: () => void;
|
|
18
20
|
startTrackingEfficient: () => void;
|
|
19
21
|
startTrackingResponsive: () => void;
|
|
20
22
|
startTrackingContinuous: () => void;
|
package/dist/@types/types.d.ts
CHANGED
package/dist/index.native.js
CHANGED
|
@@ -40,6 +40,8 @@ const trackOnce = (options) => {
|
|
|
40
40
|
};
|
|
41
41
|
const trackVerified = (options) => react_native_1.NativeModules.RNRadar.trackVerified(options);
|
|
42
42
|
const getVerifiedLocationToken = () => react_native_1.NativeModules.RNRadar.getVerifiedLocationToken();
|
|
43
|
+
const startVerifyServer = () => react_native_1.NativeModules.RNRadar.startVerifyServer();
|
|
44
|
+
const stopVerifyServer = () => react_native_1.NativeModules.RNRadar.stopVerifyServer();
|
|
43
45
|
const startTrackingEfficient = () => react_native_1.NativeModules.RNRadar.startTrackingEfficient();
|
|
44
46
|
const startTrackingResponsive = () => react_native_1.NativeModules.RNRadar.startTrackingResponsive();
|
|
45
47
|
const startTrackingContinuous = () => react_native_1.NativeModules.RNRadar.startTrackingContinuous();
|
|
@@ -100,6 +102,8 @@ const Radar = {
|
|
|
100
102
|
trackOnce,
|
|
101
103
|
trackVerified,
|
|
102
104
|
getVerifiedLocationToken,
|
|
105
|
+
startVerifyServer,
|
|
106
|
+
stopVerifyServer,
|
|
103
107
|
startTrackingEfficient,
|
|
104
108
|
startTrackingResponsive,
|
|
105
109
|
startTrackingContinuous,
|
package/dist/index.web.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare namespace Radar {
|
|
|
15
15
|
export { trackOnce };
|
|
16
16
|
export { trackVerified };
|
|
17
17
|
export { getVerifiedLocationToken };
|
|
18
|
+
export { startVerifyServer };
|
|
19
|
+
export { stopVerifyServer };
|
|
18
20
|
export { startTrackingEfficient };
|
|
19
21
|
export { startTrackingResponsive };
|
|
20
22
|
export { startTrackingContinuous };
|
|
@@ -71,6 +73,8 @@ declare function getLocation(): Promise<any>;
|
|
|
71
73
|
declare function trackOnce(options: any): Promise<any>;
|
|
72
74
|
declare function trackVerified(): Promise<any>;
|
|
73
75
|
declare function getVerifiedLocationToken(): Promise<any>;
|
|
76
|
+
declare function startVerifyServer(): void;
|
|
77
|
+
declare function stopVerifyServer(): void;
|
|
74
78
|
declare function startTrackingEfficient(): void;
|
|
75
79
|
declare function startTrackingResponsive(): void;
|
|
76
80
|
declare function startTrackingContinuous(): void;
|
package/dist/index.web.js
CHANGED
|
@@ -118,6 +118,14 @@ const getVerifiedLocationToken = () => {
|
|
|
118
118
|
throw new Error("getVerifiedLocationToken() is not implemented on web");
|
|
119
119
|
return new Promise((resolve, reject) => { reject("getVerifiedLocationToken() is not implemented on web"); });
|
|
120
120
|
};
|
|
121
|
+
const startVerifyServer = () => {
|
|
122
|
+
if (throws)
|
|
123
|
+
throw new Error("startVerifyServer() is not implemented on web");
|
|
124
|
+
};
|
|
125
|
+
const stopVerifyServer = () => {
|
|
126
|
+
if (throws)
|
|
127
|
+
throw new Error("stopVerifyServer() is not implemented on web");
|
|
128
|
+
};
|
|
121
129
|
const startTrackingEfficient = () => {
|
|
122
130
|
if (throws)
|
|
123
131
|
throw new Error("startTrackingEfficient() is not implemented on web");
|
|
@@ -471,6 +479,8 @@ const Radar = {
|
|
|
471
479
|
trackOnce,
|
|
472
480
|
trackVerified,
|
|
473
481
|
getVerifiedLocationToken,
|
|
482
|
+
startVerifyServer,
|
|
483
|
+
stopVerifyServer,
|
|
474
484
|
startTrackingEfficient,
|
|
475
485
|
startTrackingResponsive,
|
|
476
486
|
startTrackingContinuous,
|
package/ios/Cartfile.resolved
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
github "radarlabs/radar-sdk-ios" "3.18.
|
|
1
|
+
github "radarlabs/radar-sdk-ios" "3.18.5"
|
package/ios/RNRadar.m
CHANGED
|
@@ -102,7 +102,7 @@ RCT_EXPORT_MODULE();
|
|
|
102
102
|
|
|
103
103
|
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
|
|
104
104
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
105
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"3.18.5
|
|
105
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"3.18.5" forKey:@"radar-xPlatformSDKVersion"];
|
|
106
106
|
[Radar initializeWithPublishableKey:publishableKey];
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -357,6 +357,14 @@ RCT_EXPORT_METHOD(getVerifiedLocationToken:(RCTPromiseResolveBlock)resolve rejec
|
|
|
357
357
|
[Radar getVerifiedLocationToken:completionHandler];
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
+
RCT_EXPORT_METHOD(startVerifyServer) {
|
|
361
|
+
[Radar startVerifyServer];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
RCT_EXPORT_METHOD(stopVerifyServer) {
|
|
365
|
+
[Radar stopVerifyServer];
|
|
366
|
+
}
|
|
367
|
+
|
|
360
368
|
RCT_EXPORT_METHOD(startTrackingEfficient) {
|
|
361
369
|
[Radar startTrackingWithOptions:RadarTrackingOptions.presetEfficient];
|
|
362
370
|
}
|
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.
|
|
6
|
+
"version": "3.19.0-beta.1",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"/android",
|
package/plugin/build/types.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ const withRadarAndroid = (config, args) => {
|
|
|
33
33
|
<!-- for React Native -->
|
|
34
34
|
<domain-config cleartextTrafficPermitted="true">
|
|
35
35
|
<domain includeSubdomains="true">localhost</domain>
|
|
36
|
+
<domain includeSubdomains="true">10.0.2.2</domain>
|
|
36
37
|
</domain-config>
|
|
37
38
|
|
|
38
39
|
<!-- for SSL pinning -->
|
|
@@ -51,7 +51,7 @@ const withRadarIOS = (config, args) => {
|
|
|
51
51
|
const filePath = path_1.default.join(config.modRequest.platformProjectRoot, 'Podfile');
|
|
52
52
|
const contents = await promises_1.default.readFile(filePath, 'utf-8');
|
|
53
53
|
// Check if the pod declaration already exists
|
|
54
|
-
if (contents.indexOf("pod 'RadarSDKMotion', '3.18.
|
|
54
|
+
if (contents.indexOf("pod 'RadarSDKMotion', '3.18.5'") === -1) {
|
|
55
55
|
// Find the target block
|
|
56
56
|
const targetRegex = /target '(\w+)' do/g;
|
|
57
57
|
const match = targetRegex.exec(contents);
|
|
@@ -60,7 +60,33 @@ const withRadarIOS = (config, args) => {
|
|
|
60
60
|
const targetEndIndex = contents.indexOf('end', targetStartIndex) + 3;
|
|
61
61
|
// Insert the pod declaration within the target block
|
|
62
62
|
const targetBlock = contents.substring(targetStartIndex, targetEndIndex);
|
|
63
|
-
const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDKMotion', '3.18.
|
|
63
|
+
const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDKMotion', '3.18.5'`);
|
|
64
|
+
const newContents = contents.replace(targetBlock, updatedTargetBlock);
|
|
65
|
+
// Write the updated contents back to the Podfile
|
|
66
|
+
await promises_1.default.writeFile(filePath, newContents);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return config;
|
|
70
|
+
},
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
if (args.addRadarSDKVerify) {
|
|
74
|
+
config = (0, config_plugins_1.withDangerousMod)(config, [
|
|
75
|
+
'ios',
|
|
76
|
+
async (config) => {
|
|
77
|
+
const filePath = path_1.default.join(config.modRequest.platformProjectRoot, 'Podfile');
|
|
78
|
+
const contents = await promises_1.default.readFile(filePath, 'utf-8');
|
|
79
|
+
// Check if the pod declaration already exists
|
|
80
|
+
if (contents.indexOf("pod 'Telegraph', '0.30.0'") === -1) {
|
|
81
|
+
// Find the target block
|
|
82
|
+
const targetRegex = /target '(\w+)' do/g;
|
|
83
|
+
const match = targetRegex.exec(contents);
|
|
84
|
+
if (match) {
|
|
85
|
+
const targetStartIndex = match.index;
|
|
86
|
+
const targetEndIndex = contents.indexOf('end', targetStartIndex) + 3;
|
|
87
|
+
// Insert the pod declaration within the target block
|
|
88
|
+
const targetBlock = contents.substring(targetStartIndex, targetEndIndex);
|
|
89
|
+
const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'Telegraph', '0.30.0', :modular_headers => true\n pod 'CocoaAsyncSocket', :modular_headers => true\n pod 'HTTPParserC', :modular_headers => true`);
|
|
64
90
|
const newContents = contents.replace(targetBlock, updatedTargetBlock);
|
|
65
91
|
// Write the updated contents back to the Podfile
|
|
66
92
|
await promises_1.default.writeFile(filePath, newContents);
|
|
@@ -12,8 +12,8 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.summary = package[:description]
|
|
13
13
|
s.source = { git: package[:repository][:url] }
|
|
14
14
|
s.source_files = "ios/*.{h,m}"
|
|
15
|
-
s.platform = :ios, "
|
|
15
|
+
s.platform = :ios, "12.0"
|
|
16
16
|
|
|
17
17
|
s.dependency "React"
|
|
18
|
-
s.dependency "RadarSDK", "~> 3.
|
|
18
|
+
s.dependency "RadarSDK", "~> 3.19.2-beta.6"
|
|
19
19
|
end
|