react-native-applovin-max 4.1.6 → 4.1.7
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
CHANGED
|
@@ -43,7 +43,6 @@ import com.applovin.sdk.AppLovinSdk;
|
|
|
43
43
|
import com.applovin.sdk.AppLovinSdkConfiguration;
|
|
44
44
|
import com.applovin.sdk.AppLovinSdkSettings;
|
|
45
45
|
import com.applovin.sdk.AppLovinSdkUtils;
|
|
46
|
-
import com.applovin.sdk.AppLovinUserService;
|
|
47
46
|
import com.facebook.react.bridge.Arguments;
|
|
48
47
|
import com.facebook.react.bridge.Callback;
|
|
49
48
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
@@ -382,25 +381,6 @@ public class AppLovinMAXModule
|
|
|
382
381
|
sdk.showMediationDebugger();
|
|
383
382
|
}
|
|
384
383
|
|
|
385
|
-
@ReactMethod()
|
|
386
|
-
public void showConsentDialog(final Callback callback)
|
|
387
|
-
{
|
|
388
|
-
if ( sdk == null )
|
|
389
|
-
{
|
|
390
|
-
logUninitializedAccessError( "showConsentDialog" );
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
sdk.getUserService().showConsentDialog( maybeGetCurrentActivity(), new AppLovinUserService.OnConsentDialogDismissListener()
|
|
395
|
-
{
|
|
396
|
-
@Override
|
|
397
|
-
public void onDismiss()
|
|
398
|
-
{
|
|
399
|
-
callback.invoke();
|
|
400
|
-
}
|
|
401
|
-
} );
|
|
402
|
-
}
|
|
403
|
-
|
|
404
384
|
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
405
385
|
public int getConsentDialogState()
|
|
406
386
|
{
|
package/ios/AppLovinMAX.m
CHANGED
|
@@ -44,10 +44,6 @@
|
|
|
44
44
|
@property (nonatomic, strong, nullable) NSNumber *locationCollectionEnabledToSet;
|
|
45
45
|
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSString *> *extraParametersToSet;
|
|
46
46
|
|
|
47
|
-
@property (nonatomic, strong, nullable) NSNumber *consentFlowEnabledToSet;
|
|
48
|
-
@property (nonatomic, strong, nullable) NSURL *privacyPolicyURLToSet;
|
|
49
|
-
@property (nonatomic, strong, nullable) NSURL *termsOfServiceURLToSet;
|
|
50
|
-
|
|
51
47
|
@property (nonatomic, strong, nullable) NSNumber *targetingYearOfBirthToSet;
|
|
52
48
|
@property (nonatomic, copy, nullable) NSString *targetingGenderToSet;
|
|
53
49
|
@property (nonatomic, strong, nullable) NSNumber *targetingMaximumAdContentRatingToSet;
|
|
@@ -162,17 +158,8 @@ RCT_EXPORT_METHOD(initialize:(NSString *)pluginVersion :(NSString *)sdkKey :(RCT
|
|
|
162
158
|
}
|
|
163
159
|
}
|
|
164
160
|
|
|
165
|
-
ALSdkSettings *settings = [[ALSdkSettings alloc] init];
|
|
166
|
-
settings.consentFlowSettings.enabled = self.consentFlowEnabledToSet.boolValue;
|
|
167
|
-
settings.consentFlowSettings.privacyPolicyURL = self.privacyPolicyURLToSet;
|
|
168
|
-
settings.consentFlowSettings.termsOfServiceURL = self.termsOfServiceURLToSet;
|
|
169
|
-
|
|
170
|
-
self.consentFlowEnabledToSet = nil;
|
|
171
|
-
self.privacyPolicyURLToSet = nil;
|
|
172
|
-
self.termsOfServiceURLToSet = nil;
|
|
173
|
-
|
|
174
161
|
// Initialize SDK
|
|
175
|
-
self.sdk = [ALSdk sharedWithKey: sdkKey
|
|
162
|
+
self.sdk = [ALSdk sharedWithKey: sdkKey];
|
|
176
163
|
[self.sdk setPluginVersion: [@"React-Native-" stringByAppendingString: pluginVersion]];
|
|
177
164
|
[self.sdk setMediationProvider: ALMediationProviderMAX];
|
|
178
165
|
|
|
@@ -285,20 +272,6 @@ RCT_EXPORT_METHOD(showMediationDebugger)
|
|
|
285
272
|
[self.sdk showMediationDebugger];
|
|
286
273
|
}
|
|
287
274
|
|
|
288
|
-
RCT_EXPORT_METHOD(showConsentDialog:(RCTResponseSenderBlock)callback)
|
|
289
|
-
{
|
|
290
|
-
[self log: @"Failed to show consent dialog - Unavailable on iOS, please use the consent flow: https://dash.applovin.com/documentation/mediation/react-native/getting-started/consent-flow"];
|
|
291
|
-
|
|
292
|
-
callback(nil);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getConsentDialogState)
|
|
296
|
-
{
|
|
297
|
-
if ( ![self isInitialized] ) return @(ALConsentDialogStateUnknown);
|
|
298
|
-
|
|
299
|
-
return @(self.sdkConfiguration.consentDialogState);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
275
|
RCT_EXPORT_METHOD(setHasUserConsent:(BOOL)hasUserConsent)
|
|
303
276
|
{
|
|
304
277
|
[ALPrivacySettings setHasUserConsent: hasUserConsent];
|
|
@@ -415,21 +388,6 @@ RCT_EXPORT_METHOD(setExtraParameter:(NSString *)key :(nullable NSString *)value)
|
|
|
415
388
|
}
|
|
416
389
|
}
|
|
417
390
|
|
|
418
|
-
RCT_EXPORT_METHOD(setConsentFlowEnabled:(BOOL)enabled)
|
|
419
|
-
{
|
|
420
|
-
self.consentFlowEnabledToSet = @(enabled);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
RCT_EXPORT_METHOD(setPrivacyPolicyUrl:(NSString *)urlString)
|
|
424
|
-
{
|
|
425
|
-
self.privacyPolicyURLToSet = [NSURL URLWithString: urlString];
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
RCT_EXPORT_METHOD(setTermsOfServiceUrl:(NSString *)urlString)
|
|
429
|
-
{
|
|
430
|
-
self.termsOfServiceURLToSet = [NSURL URLWithString: urlString];
|
|
431
|
-
}
|
|
432
|
-
|
|
433
391
|
#pragma mark - Data Passing
|
|
434
392
|
|
|
435
393
|
RCT_EXPORT_METHOD(setTargetingDataYearOfBirth:(nonnull NSNumber *)yearOfBirth)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-applovin-max",
|
|
3
3
|
"author": "AppLovin Corporation",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.7",
|
|
5
5
|
"description": "AppLovin MAX React Native Plugin for Android and iOS",
|
|
6
6
|
"homepage": "https://github.com/AppLovin/AppLovin-MAX-React-Native",
|
|
7
7
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
13
|
s.platforms = { :ios => "10.0" }
|
|
14
|
-
s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "
|
|
14
|
+
s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_4_1_7" }
|
|
15
15
|
|
|
16
16
|
s.source_files = "ios/AppLovinMAX*.{h,m}"
|
|
17
17
|
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import NativeAdView from "./NativeAdView";
|
|
|
5
5
|
|
|
6
6
|
const { AppLovinMAX } = NativeModules;
|
|
7
7
|
|
|
8
|
-
const VERSION = "4.1.
|
|
8
|
+
const VERSION = "4.1.7";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* This enum represents whether or not the consent dialog should be shown for this user.
|
|
@@ -402,11 +402,6 @@ const setAppOpenAdExtraParameter = (adUnitId, key, value) => {
|
|
|
402
402
|
AppLovinMAX.setAppOpenAdExtraParameter(adUnitId, key, value);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
const getConsentDialogState = () => {
|
|
406
|
-
console.warn("getConsentDialogState() has been deprecated and will be removed in a future release.");
|
|
407
|
-
return AppLovinMAX.getConsentDialogState();
|
|
408
|
-
};
|
|
409
|
-
|
|
410
405
|
export default {
|
|
411
406
|
...AppLovinMAX,
|
|
412
407
|
AdView,
|
|
@@ -482,11 +477,6 @@ export default {
|
|
|
482
477
|
showAppOpenAd,
|
|
483
478
|
setAppOpenAdExtraParameter,
|
|
484
479
|
|
|
485
|
-
/*--------------------------------------------------*/
|
|
486
|
-
/* DEPRECATED (will be removed in a future release) */
|
|
487
|
-
/*--------------------------------------------------*/
|
|
488
|
-
getConsentDialogState,
|
|
489
|
-
|
|
490
480
|
/*----------------------*/
|
|
491
481
|
/** AUTO-DECLARED APIs **/
|
|
492
482
|
/*----------------------*/
|
|
@@ -501,6 +491,7 @@ export default {
|
|
|
501
491
|
/* PRIVACY APIs */
|
|
502
492
|
/*--------------*/
|
|
503
493
|
/* showConsentDialog(callback) */
|
|
494
|
+
/* getConsentDialogState() */
|
|
504
495
|
/* setHasUserConsent(hasUserConsent) */
|
|
505
496
|
/* hasUserConsent() */
|
|
506
497
|
/* setIsAgeRestrictedUser(isAgeRestrictedUser) */
|