react-native-radar 3.21.0 → 3.23.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/Radar.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/newarch/java/com/radar/RadarModule.kt +3 -6
- package/android/src/oldarch/java/com/radar/RadarModule.java +3 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/ios/RNRadar.mm +1 -1
- package/package.json +2 -2
- package/plugin/build/withRadarIOS.js +3 -2
- package/src/version.ts +1 -1
package/Radar.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -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.
|
|
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
|
-
}
|
|
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.
|
|
101
|
+
editor.putString("x_platform_sdk_version", "3.23.0-beta.1");
|
|
102
102
|
editor.apply();
|
|
103
|
-
|
|
104
|
-
|
|
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.
|
|
1
|
+
export declare const VERSION = "3.23.0-beta.1";
|
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.
|
|
6
|
+
exports.VERSION = '3.23.0-beta.1';
|
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.
|
|
142
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"3.23.0-beta.1" 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.
|
|
6
|
+
"version": "3.23.0-beta.1",
|
|
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(
|
|
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', '
|
|
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