react-native-radar 3.21.0 → 3.23.0-beta.2

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/Radar.podspec CHANGED
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,cpp}"
17
17
  s.private_header_files = "ios/**/*.h"
18
18
 
19
- s.dependency "RadarSDK", "~> 3.21.8"
19
+ s.dependency "RadarSDK", "~> 3.23.0-beta.2"
20
20
 
21
21
  install_modules_dependencies(s)
22
22
  end
@@ -83,7 +83,7 @@ dependencies {
83
83
  // Keep Kotlin stdlib internal to this module
84
84
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
85
85
 
86
- api 'io.radar:sdk:3.21.3'
86
+ api 'io.radar:sdk:3.23.0-beta.1'
87
87
  }
88
88
 
89
89
  react {
@@ -104,16 +104,13 @@ class RadarModule(reactContext: ReactApplicationContext) :
104
104
  override fun initialize(publishableKey: String, fraud: Boolean): Unit {
105
105
  val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
106
106
  editor.putString("x_platform_sdk_type", "ReactNative")
107
- editor.putString("x_platform_sdk_version", "3.21.0")
107
+ editor.putString("x_platform_sdk_version", "3.23.0-beta.1")
108
108
  editor.apply()
109
109
 
110
+ Radar.initialize(reactApplicationContext, publishableKey, null, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, currentActivity)
110
111
  if (fraud) {
111
- Radar.initialize(reactApplicationContext, publishableKey, radarReceiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud)
112
112
  Radar.setVerifiedReceiver(radarVerifiedReceiver)
113
- } else {
114
- Radar.initialize(reactApplicationContext, publishableKey)
115
- Radar.setReceiver(radarReceiver)
116
- }
113
+ }
117
114
  }
118
115
 
119
116
  override fun setLogLevel(level: String): Unit {
@@ -98,14 +98,11 @@ public class RadarModule extends ReactContextBaseJavaModule implements Permissio
98
98
  this.fraud = fraud;
99
99
  SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
100
100
  editor.putString("x_platform_sdk_type", "ReactNative");
101
- editor.putString("x_platform_sdk_version", "3.21.0");
101
+ editor.putString("x_platform_sdk_version", "3.23.0-beta.2");
102
102
  editor.apply();
103
- if (fraud) {
104
- Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
103
+ Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, getCurrentActivity());
104
+ if (fraud) {
105
105
  Radar.setVerifiedReceiver(verifiedReceiver);
106
- } else {
107
- Radar.initialize(getReactApplicationContext(), publishableKey);
108
- Radar.setReceiver(receiver);
109
106
  }
110
107
  }
111
108
 
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.21.0";
1
+ export declare const VERSION = "3.23.0-beta.2";
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // This file contains the version of the react-native-radar package
5
5
  // It should be updated to match the version in package.json
6
- exports.VERSION = '3.21.0';
6
+ exports.VERSION = '3.23.0-beta.2';
package/ios/RNRadar.mm CHANGED
@@ -139,7 +139,7 @@ RCT_EXPORT_MODULE()
139
139
 
140
140
  RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud) {
141
141
  [[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
142
- [[NSUserDefaults standardUserDefaults] setObject:@"3.21.0" forKey:@"radar-xPlatformSDKVersion"];
142
+ [[NSUserDefaults standardUserDefaults] setObject:@"3.23.0-beta.2" forKey:@"radar-xPlatformSDKVersion"];
143
143
  [Radar initializeWithPublishableKey:publishableKey];
144
144
  }
145
145
 
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.21.0",
6
+ "version": "3.23.0-beta.2",
7
7
  "main": "dist/index.js",
8
8
  "files": [
9
9
  "dist",
@@ -123,4 +123,4 @@
123
123
  }
124
124
  }
125
125
  }
126
- }
126
+ }
@@ -4,6 +4,7 @@ exports.withRadarIOS = void 0;
4
4
  const { withInfoPlist, withDangerousMod } = require("expo/config-plugins");
5
5
  const fs = require('fs/promises');
6
6
  const path = require('path');
7
+ const pkg = require("../../package.json");
7
8
  const withRadarIOS = (config, args) => {
8
9
  config = withInfoPlist(config, (config) => {
9
10
  config.modResults.NSLocationWhenInUseUsageDescription =
@@ -48,7 +49,7 @@ const withRadarIOS = (config, args) => {
48
49
  const filePath = path.join(config.modRequest.platformProjectRoot, 'Podfile');
49
50
  const contents = await fs.readFile(filePath, 'utf-8');
50
51
  // Check if the pod declaration already exists
51
- if (contents.indexOf("pod 'RadarSDKMotion', '3.20.1'") === -1) {
52
+ if (contents.indexOf(`pod 'RadarSDKMotion', '${pkg.version}'`) === -1) {
52
53
  // Find the target block
53
54
  const targetRegex = /target '(\w+)' do/g;
54
55
  const match = targetRegex.exec(contents);
@@ -58,7 +59,7 @@ const withRadarIOS = (config, args) => {
58
59
  // Insert the pod declaration within the target block
59
60
  const targetBlock = contents.substring(targetStartIndex, targetEndIndex);
60
61
  // Just for this version of the SDK, we will be using 3.21.1 of the SDKMotion pod. There is no difference between the source code of 3.21.2 and 3.21.1 for RadarSDKMotion.
61
- const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDKMotion', '3.20.1'`);
62
+ const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDKMotion', '${pkg.version}'`);
62
63
  const newContents = contents.replace(targetBlock, updatedTargetBlock);
63
64
  // Write the updated contents back to the Podfile
64
65
  await fs.writeFile(filePath, newContents);
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file contains the version of the react-native-radar package
2
2
  // It should be updated to match the version in package.json
3
- export const VERSION = '3.21.0';
3
+ export const VERSION = '3.23.0-beta.2';