react-native-radar 3.18.5 → 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.
@@ -45,6 +45,7 @@ repositories {
45
45
 
46
46
  dependencies {
47
47
  api 'com.facebook.react:react-native:+'
48
- api 'io.radar:sdk:3.18.6'
48
+ api 'org.nanohttpd:nanohttpd:2.3.1'
49
+ api 'io.radar:sdk:3.18.8-beta.1'
49
50
  }
50
51
 
@@ -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;
@@ -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,
@@ -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/RNRadar.m CHANGED
@@ -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.18.5",
6
+ "version": "3.19.0-beta.1",
7
7
  "main": "dist/index.js",
8
8
  "files": [
9
9
  "/android",
@@ -8,4 +8,5 @@ export interface RadarPluginProps {
8
8
  androidFineLocationPermission?: boolean;
9
9
  addRadarSDKMotion?: boolean;
10
10
  iosNSMotionUsageDescription?: string;
11
+ addRadarSDKVerify?: boolean;
11
12
  }
@@ -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 -->
@@ -70,6 +70,32 @@ const withRadarIOS = (config, args) => {
70
70
  },
71
71
  ]);
72
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`);
90
+ const newContents = contents.replace(targetBlock, updatedTargetBlock);
91
+ // Write the updated contents back to the Podfile
92
+ await promises_1.default.writeFile(filePath, newContents);
93
+ }
94
+ }
95
+ return config;
96
+ },
97
+ ]);
98
+ }
73
99
  return config;
74
100
  };
75
101
  exports.withRadarIOS = withRadarIOS;
@@ -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, "10.0"
15
+ s.platform = :ios, "12.0"
16
16
 
17
17
  s.dependency "React"
18
- s.dependency "RadarSDK", "~> 3.18.5"
18
+ s.dependency "RadarSDK", "~> 3.19.2-beta.6"
19
19
  end