react-native-radar 4.31.0-beta.3 → 4.32.0-beta.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/RadarSDKFraud.podspec +23 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/radar/RadarModuleImpl.java +31 -0
- package/android/src/newarch/java/com/radar/RadarModule.kt +29 -2
- package/android/src/oldarch/java/com/radar/RadarModule.java +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/ios/RNRadar.h +3 -2
- package/ios/RNRadar.mm +29 -2
- package/ios/RadarSDKFraud.xcframework/Info.plist +48 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/Info.plist +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios.abi.json +339 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios.private.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/RadarSDKFraud.framework/RadarSDKFraud +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Info.plist +20 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Resources/DWARF/RadarSDKFraud +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Resources/Relocations/aarch64/RadarSDKFraud.yml +379 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Info.plist +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios-simulator.abi.json +304 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/arm64-apple-ios-simulator.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/x86_64-apple-ios-simulator.abi.json +304 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/Modules/RadarSDKFraud.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +16 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/RadarSDKFraud +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/RadarSDKFraud.framework/_CodeSignature/CodeResources +212 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Info.plist +20 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Resources/DWARF/RadarSDKFraud +0 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Resources/Relocations/aarch64/RadarSDKFraud.yml +378 -0
- package/ios/RadarSDKFraud.xcframework/ios-arm64_x86_64-simulator/dSYMs/RadarSDKFraud.framework.dSYM/Contents/Resources/Relocations/x86_64/RadarSDKFraud.yml +330 -0
- package/ios/RadarSDKFraudStub.m +15 -0
- package/ios/RadarSDKMotion.xcframework/Info.plist +5 -5
- package/package.json +1 -1
- package/plugin/build/withRadarAndroid.js +8 -0
- package/plugin/build/withRadarIOS.js +63 -17
- package/src/version.ts +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "RadarSDKFraud"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = "RadarSDKFraud extension for react-native-radar"
|
|
9
|
+
s.homepage = "https://github.com/radarlabs/react-native-radar"
|
|
10
|
+
s.license = package["license"]
|
|
11
|
+
s.authors = "radarlabs"
|
|
12
|
+
|
|
13
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
+
s.source = { :git => "https://github.com/radarlabs/react-native-radar.git", :tag => "#{s.version}" }
|
|
15
|
+
|
|
16
|
+
s.source_files = "ios/RadarSDKFraudStub.m"
|
|
17
|
+
|
|
18
|
+
s.vendored_frameworks = "ios/RadarSDKFraud.xcframework"
|
|
19
|
+
|
|
20
|
+
s.dependency "Radar", "#{s.version}"
|
|
21
|
+
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
end
|
package/android/build.gradle
CHANGED
|
@@ -304,7 +304,26 @@ public class RadarModuleImpl {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
|
|
307
|
+
private static final String FRAUD_CLASS_NAME = "io.radar.sdk.fraud.RadarSDKFraud";
|
|
308
|
+
private static final String FRAUD_MISSING_MESSAGE =
|
|
309
|
+
"Radar fraud module is not on the classpath. Enable `androidFraud: true` " +
|
|
310
|
+
"in the react-native-radar Expo plugin config, or add " +
|
|
311
|
+
"`implementation \"io.radar:sdk-fraud:1.1.0\"` to your android/app/build.gradle.";
|
|
312
|
+
|
|
313
|
+
private static boolean isFraudModuleAvailable() {
|
|
314
|
+
try {
|
|
315
|
+
Class.forName(FRAUD_CLASS_NAME);
|
|
316
|
+
return true;
|
|
317
|
+
} catch (ClassNotFoundException e) {
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
307
322
|
public void trackVerified(ReadableMap optionsMap, final Promise promise) {
|
|
323
|
+
if (!isFraudModuleAvailable()) {
|
|
324
|
+
promise.reject(Radar.RadarStatus.ERROR_PLUGIN.toString(), FRAUD_MISSING_MESSAGE);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
308
327
|
|
|
309
328
|
boolean beaconsTrackingOption = false;
|
|
310
329
|
RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy accuracyLevel = RadarTrackingOptions.RadarTrackingOptionsDesiredAccuracy.MEDIUM;
|
|
@@ -369,6 +388,11 @@ public class RadarModuleImpl {
|
|
|
369
388
|
}
|
|
370
389
|
|
|
371
390
|
public void getVerifiedLocationToken(final Promise promise) {
|
|
391
|
+
if (!isFraudModuleAvailable()) {
|
|
392
|
+
promise.reject(Radar.RadarStatus.ERROR_PLUGIN.toString(), FRAUD_MISSING_MESSAGE);
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
|
|
372
396
|
Radar.RadarTrackVerifiedCallback trackCallback = new Radar.RadarTrackVerifiedCallback() {
|
|
373
397
|
|
|
374
398
|
public void onComplete(@NonNull Radar.RadarStatus status, @Nullable RadarVerifiedLocationToken token) {
|
|
@@ -430,6 +454,13 @@ public class RadarModuleImpl {
|
|
|
430
454
|
|
|
431
455
|
|
|
432
456
|
public void startTrackingVerified(ReadableMap optionsMap) {
|
|
457
|
+
if (!isFraudModuleAvailable()) {
|
|
458
|
+
Log.w(TAG, FRAUD_MISSING_MESSAGE);
|
|
459
|
+
// Fall through: the underlying SDK will skip the fraud payload and
|
|
460
|
+
// surface ERROR_PLUGIN per-tick. Logging here makes the misconfig
|
|
461
|
+
// visible without changing existing behavior.
|
|
462
|
+
}
|
|
463
|
+
|
|
433
464
|
boolean beacons = false;
|
|
434
465
|
int interval = 1200;
|
|
435
466
|
|
|
@@ -40,9 +40,12 @@ import org.json.JSONObject
|
|
|
40
40
|
@ReactModule(name = RadarModule.NAME)
|
|
41
41
|
class RadarModule(reactContext: ReactApplicationContext) :
|
|
42
42
|
NativeRadarSpec(reactContext), PermissionListener {
|
|
43
|
+
@Volatile
|
|
44
|
+
private var isInvalidated = false
|
|
43
45
|
|
|
44
46
|
private val radarReceiver = object : RadarReceiver() {
|
|
45
47
|
override fun onEventsReceived(context: Context, events: Array<RadarEvent>, user: RadarUser?) {
|
|
48
|
+
if (isInvalidated) return
|
|
46
49
|
val eventBlob = Arguments.createMap().apply {
|
|
47
50
|
var eventsArray = Arguments.createArray()
|
|
48
51
|
for (event in events) {
|
|
@@ -57,6 +60,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
override fun onLocationUpdated(context: Context, location: Location, user: RadarUser) {
|
|
63
|
+
if (isInvalidated) return
|
|
60
64
|
val eventBlob = Arguments.createMap().apply {
|
|
61
65
|
putString("location", Radar.jsonForLocation(location).toString())
|
|
62
66
|
putString("user", user.toJson().toString())
|
|
@@ -65,6 +69,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
override fun onClientLocationUpdated(context: Context, location: Location, stopped: Boolean, source: Radar.RadarLocationSource) {
|
|
72
|
+
if (isInvalidated) return
|
|
68
73
|
val eventBlob = Arguments.createMap().apply {
|
|
69
74
|
putString("location", Radar.jsonForLocation(location).toString())
|
|
70
75
|
putBoolean("stopped", stopped)
|
|
@@ -74,6 +79,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
74
79
|
}
|
|
75
80
|
|
|
76
81
|
override fun onError(context: Context, status: Radar.RadarStatus) {
|
|
82
|
+
if (isInvalidated) return
|
|
77
83
|
val eventBlob = Arguments.createMap().apply {
|
|
78
84
|
putString("status", status.toString())
|
|
79
85
|
}
|
|
@@ -81,6 +87,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
override fun onLog(context: Context, message: String) {
|
|
90
|
+
if (isInvalidated) return
|
|
84
91
|
val eventBlob = Arguments.createMap().apply {
|
|
85
92
|
putString("message", message)
|
|
86
93
|
}
|
|
@@ -90,6 +97,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
90
97
|
|
|
91
98
|
private val radarInAppMessageReceiver = object : RadarInAppMessageReceiver {
|
|
92
99
|
override fun onNewInAppMessage(message: RadarInAppMessage) {
|
|
100
|
+
if (isInvalidated) return
|
|
93
101
|
try {
|
|
94
102
|
val eventBlob = Arguments.createMap().apply {
|
|
95
103
|
putMap("inAppMessage", RadarUtils.mapForJson(JSONObject(message.toJson())))
|
|
@@ -101,6 +109,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
override fun onInAppMessageDismissed(message: RadarInAppMessage) {
|
|
112
|
+
if (isInvalidated) return
|
|
104
113
|
try {
|
|
105
114
|
val eventBlob = Arguments.createMap().apply {
|
|
106
115
|
putMap("inAppMessage", RadarUtils.mapForJson(JSONObject(message.toJson())))
|
|
@@ -112,6 +121,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
112
121
|
}
|
|
113
122
|
|
|
114
123
|
override fun onInAppMessageButtonClicked(message: RadarInAppMessage) {
|
|
124
|
+
if (isInvalidated) return
|
|
115
125
|
try {
|
|
116
126
|
val eventBlob = Arguments.createMap().apply {
|
|
117
127
|
putMap("inAppMessage", RadarUtils.mapForJson(JSONObject(message.toJson())))
|
|
@@ -125,6 +135,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
125
135
|
|
|
126
136
|
private val radarVerifiedReceiver = object : RadarVerifiedReceiver() {
|
|
127
137
|
override fun onTokenUpdated(context: Context, token: RadarVerifiedLocationToken) {
|
|
138
|
+
if (isInvalidated) return
|
|
128
139
|
val eventBlob = Arguments.createMap().apply {
|
|
129
140
|
putString("token", token.toJson().toString())
|
|
130
141
|
}
|
|
@@ -140,10 +151,26 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
140
151
|
return NAME
|
|
141
152
|
}
|
|
142
153
|
|
|
154
|
+
override fun invalidate() {
|
|
155
|
+
isInvalidated = true
|
|
156
|
+
|
|
157
|
+
// Detach from the process-level Radar singleton so this stale module
|
|
158
|
+
// instance stops receiving callbacks after its JS runtime is gone.
|
|
159
|
+
Radar.setReceiver(null)
|
|
160
|
+
|
|
161
|
+
try {
|
|
162
|
+
Radar.setVerifiedReceiver(null)
|
|
163
|
+
} catch (e: Exception) {
|
|
164
|
+
Log.e(TAG, "Error detaching verified receiver", e)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
super.invalidate()
|
|
168
|
+
}
|
|
169
|
+
|
|
143
170
|
override fun initialize(publishableKey: String, fraud: Boolean, options: ReadableMap?): Unit {
|
|
144
171
|
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
|
|
145
172
|
editor.putString("x_platform_sdk_type", "ReactNative")
|
|
146
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
173
|
+
editor.putString("x_platform_sdk_version", "4.32.0-beta.0")
|
|
147
174
|
editor.apply()
|
|
148
175
|
|
|
149
176
|
Radar.initialize(reactApplicationContext, publishableKey, radarReceiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud, null, radarInAppMessageReceiver, currentActivity)
|
|
@@ -155,7 +182,7 @@ class RadarModule(reactContext: ReactApplicationContext) :
|
|
|
155
182
|
override fun initializeWithAuthToken(authToken: String, fraud: Boolean, options: ReadableMap?): Unit {
|
|
156
183
|
val editor = reactApplicationContext.getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit()
|
|
157
184
|
editor.putString("x_platform_sdk_type", "ReactNative")
|
|
158
|
-
editor.putString("x_platform_sdk_version", "4.
|
|
185
|
+
editor.putString("x_platform_sdk_version", "4.32.0-beta.0")
|
|
159
186
|
editor.apply()
|
|
160
187
|
|
|
161
188
|
val initOptions = io.radar.sdk.RadarInitializeOptions.builder()
|
|
@@ -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.32.0-beta.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.32.0-beta.0");
|
|
119
119
|
editor.apply();
|
|
120
120
|
|
|
121
121
|
io.radar.sdk.RadarInitializeOptions.Builder builder = io.radar.sdk.RadarInitializeOptions.builder()
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.32.0-beta.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.32.0-beta.0';
|
package/ios/RNRadar.h
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
#import <RadarSDK/RadarSDK.h>
|
|
8
8
|
#import <React/RCTBridgeModule.h>
|
|
9
|
+
#import <React/RCTInvalidating.h>
|
|
9
10
|
|
|
10
11
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
11
|
-
@interface RNRadar : NativeRadarSpecBase <NativeRadarSpec, RadarDelegate, CLLocationManagerDelegate, RadarVerifiedDelegate, RadarInAppMessageProtocol>
|
|
12
|
+
@interface RNRadar : NativeRadarSpecBase <NativeRadarSpec, RadarDelegate, CLLocationManagerDelegate, RadarVerifiedDelegate, RadarInAppMessageProtocol, RCTInvalidating>
|
|
12
13
|
#else
|
|
13
|
-
@interface RNRadar : RCTEventEmitter <RCTBridgeModule, RadarDelegate, CLLocationManagerDelegate, RadarVerifiedDelegate, RadarInAppMessageProtocol>
|
|
14
|
+
@interface RNRadar : RCTEventEmitter <RCTBridgeModule, RadarDelegate, CLLocationManagerDelegate, RadarVerifiedDelegate, RadarInAppMessageProtocol, RCTInvalidating>
|
|
14
15
|
#endif
|
|
15
16
|
|
|
16
17
|
@end
|
package/ios/RNRadar.mm
CHANGED
|
@@ -55,6 +55,22 @@ RCT_EXPORT_MODULE()
|
|
|
55
55
|
hasListeners = NO;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
- (void)invalidate {
|
|
59
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
60
|
+
jsEventEmitterReady = NO;
|
|
61
|
+
#endif
|
|
62
|
+
hasListeners = NO;
|
|
63
|
+
|
|
64
|
+
// Detach from the process-level Radar singleton so a stale module
|
|
65
|
+
// instance doesn't continue to receive events.
|
|
66
|
+
[Radar setDelegate:nil];
|
|
67
|
+
[Radar setVerifiedDelegate:nil];
|
|
68
|
+
[Radar setInAppMessageDelegate:nil];
|
|
69
|
+
|
|
70
|
+
locationManager.delegate = nil;
|
|
71
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
72
|
+
}
|
|
73
|
+
|
|
58
74
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
59
75
|
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper {
|
|
60
76
|
[super setEventEmitterCallback:eventEmitterCallbackWrapper];
|
|
@@ -217,7 +233,7 @@ RCT_EXPORT_MODULE()
|
|
|
217
233
|
RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud options:(NSDictionary *)options) {
|
|
218
234
|
_publishableKey = publishableKey;
|
|
219
235
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
220
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"4.
|
|
236
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"4.32.0-beta.0" forKey:@"radar-xPlatformSDKVersion"];
|
|
221
237
|
|
|
222
238
|
RadarInitializeOptions *radarOptions = [[RadarInitializeOptions alloc] init];
|
|
223
239
|
if (options != nil) {
|
|
@@ -240,7 +256,7 @@ RCT_EXPORT_METHOD(initialize:(NSString *)publishableKey fraud:(BOOL)fraud option
|
|
|
240
256
|
RCT_EXPORT_METHOD(initializeWithAuthToken:(NSString *)authToken fraud:(BOOL)fraud options:(NSDictionary *)options) {
|
|
241
257
|
_publishableKey = nil;
|
|
242
258
|
[[NSUserDefaults standardUserDefaults] setObject:@"ReactNative" forKey:@"radar-xPlatformSDKType"];
|
|
243
|
-
[[NSUserDefaults standardUserDefaults] setObject:@"4.
|
|
259
|
+
[[NSUserDefaults standardUserDefaults] setObject:@"4.32.0-beta.0" forKey:@"radar-xPlatformSDKVersion"];
|
|
244
260
|
RadarInitializeOptions *radarOptions = [[RadarInitializeOptions alloc] init];
|
|
245
261
|
if (options != nil) {
|
|
246
262
|
id silentPushValue = options[@"silentPush"];
|
|
@@ -494,6 +510,17 @@ RCT_EXPORT_METHOD(trackOnce:(NSDictionary *)optionsDict resolve:(RCTPromiseResol
|
|
|
494
510
|
|
|
495
511
|
|
|
496
512
|
RCT_EXPORT_METHOD(trackVerified:(NSDictionary *)optionsDict resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) {
|
|
513
|
+
if (!NSClassFromString(@"RadarSDKFraud")) {
|
|
514
|
+
reject(@"ERROR_PLUGIN",
|
|
515
|
+
@"trackVerified requires the RadarSDKFraud module. "
|
|
516
|
+
@"Set iosFraud: true in your react-native-radar Expo config plugin "
|
|
517
|
+
@"(or add `pod 'RadarSDKFraud', :path => '../node_modules/react-native-radar'` "
|
|
518
|
+
@"to your ios/Podfile manually), then re-run `npx expo prebuild --clean` "
|
|
519
|
+
@"and `pod install`.",
|
|
520
|
+
nil);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
|
|
497
524
|
BOOL beacons = NO;
|
|
498
525
|
RadarTrackingOptionsDesiredAccuracy desiredAccuracy = RadarTrackingOptionsDesiredAccuracyMedium;
|
|
499
526
|
NSString *reason = nil;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>AvailableLibraries</key>
|
|
6
|
+
<array>
|
|
7
|
+
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>RadarSDKFraud.framework/RadarSDKFraud</string>
|
|
10
|
+
<key>DebugSymbolsPath</key>
|
|
11
|
+
<string>dSYMs</string>
|
|
12
|
+
<key>LibraryIdentifier</key>
|
|
13
|
+
<string>ios-arm64</string>
|
|
14
|
+
<key>LibraryPath</key>
|
|
15
|
+
<string>RadarSDKFraud.framework</string>
|
|
16
|
+
<key>SupportedArchitectures</key>
|
|
17
|
+
<array>
|
|
18
|
+
<string>arm64</string>
|
|
19
|
+
</array>
|
|
20
|
+
<key>SupportedPlatform</key>
|
|
21
|
+
<string>ios</string>
|
|
22
|
+
</dict>
|
|
23
|
+
<dict>
|
|
24
|
+
<key>BinaryPath</key>
|
|
25
|
+
<string>RadarSDKFraud.framework/RadarSDKFraud</string>
|
|
26
|
+
<key>DebugSymbolsPath</key>
|
|
27
|
+
<string>dSYMs</string>
|
|
28
|
+
<key>LibraryIdentifier</key>
|
|
29
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
30
|
+
<key>LibraryPath</key>
|
|
31
|
+
<string>RadarSDKFraud.framework</string>
|
|
32
|
+
<key>SupportedArchitectures</key>
|
|
33
|
+
<array>
|
|
34
|
+
<string>arm64</string>
|
|
35
|
+
<string>x86_64</string>
|
|
36
|
+
</array>
|
|
37
|
+
<key>SupportedPlatform</key>
|
|
38
|
+
<string>ios</string>
|
|
39
|
+
<key>SupportedPlatformVariant</key>
|
|
40
|
+
<string>simulator</string>
|
|
41
|
+
</dict>
|
|
42
|
+
</array>
|
|
43
|
+
<key>CFBundlePackageType</key>
|
|
44
|
+
<string>XFWK</string>
|
|
45
|
+
<key>XCFrameworkFormatVersion</key>
|
|
46
|
+
<string>1.0</string>
|
|
47
|
+
</dict>
|
|
48
|
+
</plist>
|