react-native-radar 4.34.0 → 4.35.0
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 +1 -1
- package/android/src/main/java/com/radar/RadarModuleImpl.java +28 -0
- package/android/src/newarch/java/com/radar/RadarModule.kt +18 -2
- package/android/src/oldarch/java/com/radar/RadarModule.java +22 -2
- package/dist/@types/RadarNativeInterface.d.ts +4 -0
- package/dist/NativeRadar.d.ts +4 -0
- package/dist/index.native.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/ios/RNRadar.mm +18 -2
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/Radar.h +3 -4
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/RadarSDK-Swift.h +1 -1
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/RadarSdkConfiguration.h +1 -0
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Info.plist +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.abi.json +1447 -88
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/RadarSDK +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/Radar.h +3 -4
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/RadarSDK-Swift.h +2 -2
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Headers/RadarSdkConfiguration.h +1 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Info.plist +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +1447 -88
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +1447 -88
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/Modules/RadarSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +36 -2
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/RadarSDK +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RadarSDK.xcframework/ios-arm64_x86_64-simulator/RadarSDK.framework/_CodeSignature/CodeResources +27 -27
- package/ios/RadarSDKMotion.xcframework/Info.plist +5 -5
- package/ios/RadarSDKMotion.xcframework/ios-arm64/RadarSDKMotion.framework/Info.plist +0 -0
- package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/Info.plist +0 -0
- package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RadarSDKMotion.xcframework/ios-arm64_x86_64-simulator/RadarSDKMotion.framework/_CodeSignature/CodeResources +1 -1
- package/package.json +1 -1
- package/src/@types/RadarNativeInterface.ts +4 -0
- package/src/NativeRadar.ts +4 -0
- package/src/index.native.ts +12 -0
- package/src/version.ts +1 -1
package/android/build.gradle
CHANGED
|
@@ -165,6 +165,30 @@ public class RadarModuleImpl {
|
|
|
165
165
|
promise.resolve(product);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
public void setUserLanguage(String userLanguage) {
|
|
169
|
+
Radar.setUserLanguage(userLanguage);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public void getUserLanguage(final Promise promise) {
|
|
173
|
+
if (promise == null) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
promise.resolve(Radar.getUserLanguage());
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
public void isSharing(final Promise promise) {
|
|
181
|
+
if (promise == null) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
promise.resolve(Radar.isSharing());
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public void clearSharing() {
|
|
189
|
+
Radar.clearSharing();
|
|
190
|
+
}
|
|
191
|
+
|
|
168
192
|
|
|
169
193
|
public void setAnonymousTrackingEnabled(boolean enabled) {
|
|
170
194
|
Radar.setAnonymousTrackingEnabled(enabled);
|
|
@@ -1169,6 +1193,10 @@ public class RadarModuleImpl {
|
|
|
1169
1193
|
Radar.ipGeocode(new Radar.RadarIpGeocodeCallback() {
|
|
1170
1194
|
|
|
1171
1195
|
public void onComplete(@NonNull Radar.RadarStatus status, @Nullable RadarAddress address, boolean proxy) {
|
|
1196
|
+
onComplete(status, address, proxy, null);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
public void onComplete(@NonNull Radar.RadarStatus status, @Nullable RadarAddress address, boolean proxy, @Nullable Throwable throwable) {
|
|
1172
1200
|
if (status == Radar.RadarStatus.SUCCESS) {
|
|
1173
1201
|
try {
|
|
1174
1202
|
WritableMap map = Arguments.createMap();
|
|
@@ -170,7 +170,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
170
170
|
override fun initialize(publishableKey: String, fraud: Boolean, options: ReadableMap?): Unit {
|
|
171
171
|
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
|
|
172
172
|
editor.putString("x_platform_sdk_type", "ReactNative")
|
|
173
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
173
|
+
editor.putString("x_platform_sdk_version", "4.35.0")
|
|
174
174
|
editor.apply()
|
|
175
175
|
|
|
176
176
|
Radar.initialize(reactApplicationContext, publishableKey, radarReceiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, radarInAppMessageReceiver, currentActivity)
|
|
@@ -182,7 +182,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
182
182
|
override fun initializeWithAuthToken(authToken: String, fraud: Boolean, options: ReadableMap?): Unit {
|
|
183
183
|
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
|
|
184
184
|
editor.putString("x_platform_sdk_type", "ReactNative")
|
|
185
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
185
|
+
editor.putString("x_platform_sdk_version", "4.35.0")
|
|
186
186
|
editor.apply()
|
|
187
187
|
|
|
188
188
|
val initOptions = io.radar.sdk.RadarInitializeOptions.builder()
|
|
@@ -251,6 +251,22 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
251
251
|
radarModuleImpl.getProduct(promise)
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
override fun setUserLanguage(language: String?): Unit {
|
|
255
|
+
radarModuleImpl.setUserLanguage(language)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
override fun getUserLanguage(promise: Promise): Unit {
|
|
259
|
+
radarModuleImpl.getUserLanguage(promise)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
override fun isSharing(promise: Promise): Unit {
|
|
263
|
+
radarModuleImpl.isSharing(promise)
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
override fun clearSharing(): Unit {
|
|
267
|
+
radarModuleImpl.clearSharing()
|
|
268
|
+
}
|
|
269
|
+
|
|
254
270
|
override fun setAnonymousTrackingEnabled(enabled: Boolean): Unit {
|
|
255
271
|
radarModuleImpl.setAnonymousTrackingEnabled(enabled)
|
|
256
272
|
}
|
|
@@ -102,7 +102,7 @@ public class RadarModule extends ReactContextBaseJavaModule implements Permissio
|
|
|
102
102
|
this.fraud = fraud;
|
|
103
103
|
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
104
104
|
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
105
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
105
|
+
editor.putString("x_platform_sdk_version", "4.35.0");
|
|
106
106
|
editor.apply();
|
|
107
107
|
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, inAppMessageReceiver, getCurrentActivity());
|
|
108
108
|
if (fraud) {
|
|
@@ -115,7 +115,7 @@ public class RadarModule extends ReactContextBaseJavaModule implements Permissio
|
|
|
115
115
|
this.fraud = fraud;
|
|
116
116
|
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
|
|
117
117
|
editor.putString("x_platform_sdk_type", "ReactNative");
|
|
118
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
118
|
+
editor.putString("x_platform_sdk_version", "4.35.0");
|
|
119
119
|
editor.apply();
|
|
120
120
|
|
|
121
121
|
io.radar.sdk.RadarInitializeOptions.Builder builder = io.radar.sdk.RadarInitializeOptions.builder()
|
|
@@ -289,6 +289,26 @@ public class RadarModule extends ReactContextBaseJavaModule implements Permissio
|
|
|
289
289
|
radarModuleImpl.getProduct(promise);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
@ReactMethod
|
|
293
|
+
public void setUserLanguage(String userLanguage) {
|
|
294
|
+
radarModuleImpl.setUserLanguage(userLanguage);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@ReactMethod
|
|
298
|
+
public void getUserLanguage(final Promise promise) {
|
|
299
|
+
radarModuleImpl.getUserLanguage(promise);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@ReactMethod
|
|
303
|
+
public void isSharing(final Promise promise) {
|
|
304
|
+
radarModuleImpl.isSharing(promise);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@ReactMethod
|
|
308
|
+
public void clearSharing() {
|
|
309
|
+
radarModuleImpl.clearSharing();
|
|
310
|
+
}
|
|
311
|
+
|
|
292
312
|
@ReactMethod
|
|
293
313
|
public void getVerifiedLocationToken(final Promise promise) {
|
|
294
314
|
radarModuleImpl.getVerifiedLocationToken(promise);
|
|
@@ -15,6 +15,10 @@ export interface RadarNativeInterface {
|
|
|
15
15
|
removeTags: (tags: string[]) => void;
|
|
16
16
|
setProduct(product: string): void;
|
|
17
17
|
getProduct: () => Promise<string>;
|
|
18
|
+
setUserLanguage: (language: string | null) => void;
|
|
19
|
+
getUserLanguage: () => Promise<string | null>;
|
|
20
|
+
isSharing: () => Promise<boolean>;
|
|
21
|
+
clearSharing: () => void;
|
|
18
22
|
setAnonymousTrackingEnabled: (enabled: boolean) => void;
|
|
19
23
|
getPermissionsStatus: () => Promise<RadarPermissionsStatus>;
|
|
20
24
|
requestPermissions: (background: boolean) => Promise<RadarPermissionsStatus>;
|
package/dist/NativeRadar.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface Spec extends TurboModule {
|
|
|
50
50
|
removeTags(tags: Array<string>): void;
|
|
51
51
|
setProduct(product: string): void;
|
|
52
52
|
getProduct(): Promise<string>;
|
|
53
|
+
setUserLanguage(language: string | null): void;
|
|
54
|
+
getUserLanguage(): Promise<string>;
|
|
55
|
+
isSharing(): Promise<boolean>;
|
|
56
|
+
clearSharing(): void;
|
|
53
57
|
setAnonymousTrackingEnabled(enabled: boolean): void;
|
|
54
58
|
getLocation(desiredAccuracy: string | null): Promise<Object>;
|
|
55
59
|
trackVerified(trackVerifiedOptions: Object | null): Promise<Object>;
|
package/dist/index.native.js
CHANGED
|
@@ -256,6 +256,18 @@ const Radar = {
|
|
|
256
256
|
getProduct: function () {
|
|
257
257
|
return NativeRadar.getProduct();
|
|
258
258
|
},
|
|
259
|
+
setUserLanguage: function (language) {
|
|
260
|
+
return NativeRadar.setUserLanguage(language);
|
|
261
|
+
},
|
|
262
|
+
getUserLanguage: function () {
|
|
263
|
+
return NativeRadar.getUserLanguage();
|
|
264
|
+
},
|
|
265
|
+
isSharing: function () {
|
|
266
|
+
return NativeRadar.isSharing();
|
|
267
|
+
},
|
|
268
|
+
clearSharing: function () {
|
|
269
|
+
return NativeRadar.clearSharing();
|
|
270
|
+
},
|
|
259
271
|
setAnonymousTrackingEnabled: function (enabled) {
|
|
260
272
|
return NativeRadar.setAnonymousTrackingEnabled(enabled);
|
|
261
273
|
},
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.35.0";
|
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 = '4.
|
|
6
|
+
exports.VERSION = '4.35.0';
|
package/ios/RNRadar.mm
CHANGED
|
@@ -233,7 +233,7 @@ RCT_EXPORT_MODULE()
|
|
|
233
233
|
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud options:(NSDictionary *)options) {
|
|
234
234
|
_publishableKey = publishableKey;
|
|
235
235
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
236
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"4.
|
|
236
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"4.35.0" forKey:@"radar-xPlatformSDKVersion"];
|
|
237
237
|
|
|
238
238
|
RadarInitializeOptions *radarOptions = [[RadarInitializeOptions alloc] init];
|
|
239
239
|
if (options != nil) {
|
|
@@ -256,7 +256,7 @@ RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud option
|
|
|
256
256
|
RCT_EXPORT_METHOD(initializeWithAuthToken:(NSString *)authToken fraud:(BOOL)fraud options:(NSDictionary *)options) {
|
|
257
257
|
_publishableKey = nil;
|
|
258
258
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
259
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"4.
|
|
259
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"4.35.0" forKey:@"radar-xPlatformSDKVersion"];
|
|
260
260
|
RadarInitializeOptions *radarOptions = [[RadarInitializeOptions alloc] init];
|
|
261
261
|
if (options != nil) {
|
|
262
262
|
id silentPushValue = options[@"silentPush"];
|
|
@@ -339,6 +339,22 @@ RCT_EXPORT_METHOD(getProduct:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseR
|
|
|
339
339
|
resolve([Radar getProduct]);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
RCT_EXPORT_METHOD(setUserLanguage:(NSString *)userLanguage) {
|
|
343
|
+
[Radar setUserLanguage:userLanguage];
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
RCT_EXPORT_METHOD(getUserLanguage:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
|
|
347
|
+
resolve([Radar getUserLanguage]);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
RCT_EXPORT_METHOD(isSharing:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
|
|
351
|
+
resolve(@([Radar isSharing]));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
RCT_EXPORT_METHOD(clearSharing) {
|
|
355
|
+
[Radar clearSharing];
|
|
356
|
+
}
|
|
357
|
+
|
|
342
358
|
RCT_EXPORT_METHOD(setAnonymousTrackingEnabled:(BOOL)enabled) {
|
|
343
359
|
[Radar setAnonymousTrackingEnabled:enabled];
|
|
344
360
|
}
|
|
@@ -1323,8 +1323,7 @@ typedef void (^_Nonnull RadarIndoorsScanCompletionHandler)(NSString *_Nullable r
|
|
|
1323
1323
|
|
|
1324
1324
|
@see https://radar.com/documentation/api#ip-geocode
|
|
1325
1325
|
*/
|
|
1326
|
-
+ (void)ipGeocodeWithCompletionHandler:(RadarIPGeocodeCompletionHandler)completionHandler
|
|
1327
|
-
__attribute__((deprecated("Use ipGeocodeWithErrorCompletionHandler: to also receive the underlying NSError on network/parse errors.")));
|
|
1326
|
+
+ (void)ipGeocodeWithCompletionHandler:(RadarIPGeocodeCompletionHandler)completionHandler NS_SWIFT_NAME(ipGeocode(completionHandler:));
|
|
1328
1327
|
|
|
1329
1328
|
/**
|
|
1330
1329
|
Geocodes the device's current IP address, converting IP address to partial address. The completion handler also receives the underlying NSError when the failure originated from a caught network, parse, or exception error — forward it to an error collector (Sentry, Crashlytics, etc.) to capture diagnostics.
|
|
@@ -1333,8 +1332,8 @@ typedef void (^_Nonnull RadarIndoorsScanCompletionHandler)(NSString *_Nullable r
|
|
|
1333
1332
|
|
|
1334
1333
|
@see https://radar.com/documentation/api#ip-geocode
|
|
1335
1334
|
*/
|
|
1336
|
-
+ (void)ipGeocodeWithErrorCompletionHandler:(RadarIPGeocodeWithErrorCompletionHandler)completionHandler
|
|
1337
|
-
|
|
1335
|
+
+ (void)ipGeocodeWithErrorCompletionHandler:(RadarIPGeocodeWithErrorCompletionHandler)completionHandler
|
|
1336
|
+
NS_SWIFT_NAME(ipGeocode(completionHandler:)) NS_SWIFT_DISABLE_ASYNC;
|
|
1338
1337
|
|
|
1339
1338
|
/**
|
|
1340
1339
|
Validates an address, attaching a verification status, property type, and ZIP+4.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 6.3.
|
|
3
|
+
// Generated by Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)
|
|
4
4
|
#ifndef RADARSDK_SWIFT_H
|
|
5
5
|
#define RADARSDK_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
package/ios/RadarSDK.xcframework/ios-arm64/RadarSDK.framework/Headers/RadarSdkConfiguration.h
CHANGED
|
@@ -42,6 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
42
42
|
- (NSArray<RadarRemoteTrackingOptions *> *_Nullable)remoteTrackingOptions;
|
|
43
43
|
- (instancetype)initWithDict:(NSDictionary *_Nullable)dict;
|
|
44
44
|
- (NSDictionary *)dictionaryValue;
|
|
45
|
+
+ (RadarSdkConfiguration *_Nullable)current;
|
|
45
46
|
@end
|
|
46
47
|
|
|
47
48
|
/**
|
|
Binary file
|