react-native-applovin-max 6.2.0 → 6.2.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.
@@ -35,8 +35,8 @@ android {
35
35
  defaultConfig {
36
36
  minSdkVersion 16
37
37
  targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
38
- versionCode 6020000
39
- versionName "6.2.0"
38
+ versionCode 6020200
39
+ versionName "6.2.2"
40
40
  }
41
41
 
42
42
  flavorDimensions("default")
@@ -16,6 +16,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
16
16
  import com.facebook.react.uimanager.events.RCTEventEmitter;
17
17
  import com.facebook.react.views.view.ReactViewGroup;
18
18
 
19
+ import java.util.HashMap;
19
20
  import java.util.Map;
20
21
 
21
22
  import androidx.annotation.Nullable;
@@ -27,6 +28,8 @@ class AppLovinMAXAdView
27
28
  extends ReactViewGroup
28
29
  implements MaxAdListener, MaxAdViewAdListener, MaxAdRevenueListener
29
30
  {
31
+ private static final Map<String, MaxAdView> adViewInstances = new HashMap<>( 2 );
32
+
30
33
  private final ThemedReactContext reactContext;
31
34
 
32
35
  @Nullable
@@ -45,6 +48,11 @@ class AppLovinMAXAdView
45
48
  @Nullable
46
49
  private Map<String, Object> localExtraParameters;
47
50
 
51
+ public static MaxAdView getInstance(final String adUnitId)
52
+ {
53
+ return adViewInstances.get( adUnitId );
54
+ }
55
+
48
56
  public AppLovinMAXAdView(final Context context)
49
57
  {
50
58
  super( context );
@@ -268,6 +276,8 @@ class AppLovinMAXAdView
268
276
  adView.loadAd();
269
277
 
270
278
  addView( adView );
279
+
280
+ adViewInstances.put( adUnitId, adView );
271
281
  }, 250 );
272
282
  }
273
283
 
@@ -277,6 +287,8 @@ class AppLovinMAXAdView
277
287
  {
278
288
  AppLovinMAXModule.d( "Unmounting MaxAdView: " + adView );
279
289
 
290
+ adViewInstances.remove( adView.getAdUnitId() );
291
+
280
292
  removeView( adView );
281
293
 
282
294
  adView.setListener( null );
@@ -37,6 +37,8 @@ import com.applovin.mediation.ads.MaxAppOpenAd;
37
37
  import com.applovin.mediation.ads.MaxInterstitialAd;
38
38
  import com.applovin.mediation.ads.MaxRewardedAd;
39
39
  import com.applovin.sdk.AppLovinAdContentRating;
40
+ import com.applovin.sdk.AppLovinCmpError;
41
+ import com.applovin.sdk.AppLovinCmpService;
40
42
  import com.applovin.sdk.AppLovinGender;
41
43
  import com.applovin.sdk.AppLovinMediationProvider;
42
44
  import com.applovin.sdk.AppLovinPrivacySettings;
@@ -668,6 +670,48 @@ public class AppLovinMAXModule
668
670
  debugUserGeographyToSet = userGeography;
669
671
  }
670
672
 
673
+ @ReactMethod
674
+ public void showCmpForExistingUser(final Promise promise)
675
+ {
676
+ if ( sdk == null )
677
+ {
678
+ logUninitializedAccessError( "showCmpForExistingUser", promise );
679
+ return;
680
+ }
681
+
682
+ Activity currentActivity = maybeGetCurrentActivity();
683
+ if ( currentActivity == null )
684
+ {
685
+ promise.reject( new IllegalStateException( "ERROR: Failed to execute showCmpForExistingUser() - unable to get current Activity." ) );
686
+ return;
687
+ }
688
+
689
+ AppLovinCmpService cmpService = sdk.getCmpService();
690
+ cmpService.showCmpForExistingUser( currentActivity, (@Nullable final AppLovinCmpError error) -> {
691
+
692
+ if ( error == null )
693
+ {
694
+ promise.resolve( null );
695
+ return;
696
+ }
697
+
698
+ promise.resolve( error.getCmpCode() );
699
+ } );
700
+ }
701
+
702
+ @ReactMethod
703
+ public void hasSupportedCmp(final Promise promise)
704
+ {
705
+ if ( sdk == null )
706
+ {
707
+ logUninitializedAccessError( "showCmpForExistingUser", promise );
708
+ return;
709
+ }
710
+
711
+ AppLovinCmpService cmpService = sdk.getCmpService();
712
+ promise.resolve( cmpService.hasSupportedCmp() );
713
+ }
714
+
671
715
  // Data Passing
672
716
 
673
717
  @ReactMethod
@@ -2389,7 +2433,20 @@ public class AppLovinMAXModule
2389
2433
 
2390
2434
  public static void logUninitializedAccessError(final String callingMethod)
2391
2435
  {
2392
- e( "ERROR: Failed to execute " + callingMethod + "() - please ensure the AppLovin MAX React Native module has been initialized by calling 'AppLovinMAX.initialize(...);'!" );
2436
+ logUninitializedAccessError( callingMethod, null );
2437
+ }
2438
+
2439
+ public static void logUninitializedAccessError(final String callingMethod, @Nullable final Promise promise)
2440
+ {
2441
+ String message = "ERROR: Failed to execute " + callingMethod + "() - please ensure the AppLovin MAX React Native module has been initialized by calling 'AppLovinMAX.initialize(...);'!";
2442
+
2443
+ if ( promise == null )
2444
+ {
2445
+ e( message );
2446
+ return;
2447
+ }
2448
+
2449
+ promise.reject( new IllegalStateException( message ) );
2393
2450
  }
2394
2451
 
2395
2452
  public static void d(final String message)
@@ -2711,16 +2768,40 @@ public class AppLovinMAXModule
2711
2768
  MaxInterstitialAd interstitial = retrieveInterstitial( adUnitId, "setAmazonResult" );
2712
2769
  if ( interstitial == null )
2713
2770
  {
2714
- e( "Unable to set Amazon result - unable to retrieve interstitial" );
2771
+ e( "Failed to set Amazon result - unable to find interstitial" );
2715
2772
  return;
2716
2773
  }
2717
2774
 
2718
2775
  interstitial.setLocalExtraParameter( key, result );
2719
2776
  }
2720
- else
2777
+ else if ( adFormat == MaxAdFormat.REWARDED )
2721
2778
  {
2722
- MaxAdView adView = retrieveAdView( adUnitId, adFormat );
2723
- adView.setLocalExtraParameter( key, result );
2779
+ MaxRewardedAd rewardedAd = retrieveRewardedAd( adUnitId, "setAmazonResult" );
2780
+ if ( rewardedAd == null )
2781
+ {
2782
+ e( "Failed to set Amazon result - unable to find rewarded ad" );
2783
+ return;
2784
+ }
2785
+
2786
+ rewardedAd.setLocalExtraParameter( key, result );
2787
+ }
2788
+ else // MaxAdFormat.BANNER or MaxAdFormat.MREC
2789
+ {
2790
+ MaxAdView adView = AppLovinMAXAdView.getInstance( adUnitId );
2791
+
2792
+ if ( adView == null )
2793
+ {
2794
+ adView = retrieveAdView( adUnitId, adFormat );
2795
+ }
2796
+
2797
+ if ( adView != null )
2798
+ {
2799
+ adView.setLocalExtraParameter( key, result );
2800
+ }
2801
+ else
2802
+ {
2803
+ e( "Failed to set Amazon result - unable to find " + adFormat );
2804
+ }
2724
2805
  }
2725
2806
  }
2726
2807
 
@@ -471,7 +471,7 @@ public class AppLovinMAXNativeAdView
471
471
 
472
472
  private static void sizeToFit(final @Nullable View view, final View parentView)
473
473
  {
474
- if ( view != null )
474
+ if ( view != null && parentView != null )
475
475
  {
476
476
  view.measure( MeasureSpec.makeMeasureSpec( parentView.getWidth(), MeasureSpec.EXACTLY ),
477
477
  MeasureSpec.makeMeasureSpec( parentView.getHeight(), MeasureSpec.EXACTLY ) );
package/ios/AppLovinMAX.m CHANGED
@@ -7,6 +7,7 @@
7
7
  //
8
8
 
9
9
  #import "AppLovinMAX.h"
10
+ #import "AppLovinMAXAdView.h"
10
11
  #import "AppLovinMAXNativeAdView.h"
11
12
 
12
13
  #define ROOT_VIEW_CONTROLLER (UIApplication.sharedApplication.keyWindow.rootViewController)
@@ -553,6 +554,39 @@ RCT_EXPORT_METHOD(setConsentFlowDebugUserGeography:(NSString *)userGeography)
553
554
  self.debugUserGeographyToSet = userGeography;
554
555
  }
555
556
 
557
+ RCT_EXPORT_METHOD(showCmpForExistingUser:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject)
558
+ {
559
+ if ( !self.sdk )
560
+ {
561
+ [self logUninitializedAccessError: @"showCmpForExistingUser" withPromiseReject: reject];
562
+ return;
563
+ }
564
+
565
+ ALCMPService *cmpService = self.sdk.cmpService;
566
+ [cmpService showCMPForExistingUserWithCompletion:^(ALCMPError * _Nullable error) {
567
+
568
+ if ( !error )
569
+ {
570
+ resolve(nil);
571
+ return;
572
+ }
573
+
574
+ resolve(@(error.code));
575
+ }];
576
+ }
577
+
578
+ RCT_EXPORT_METHOD(hasSupportedCmp:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject)
579
+ {
580
+ if ( !self.sdk )
581
+ {
582
+ [self logUninitializedAccessError: @"hasSupportedCmp" withPromiseReject: reject];
583
+ return;
584
+ }
585
+
586
+ ALCMPService *cmpService = self.sdk.cmpService;
587
+ resolve(@([cmpService hasSupportedCMP]));
588
+ }
589
+
556
590
  #pragma mark - Data Passing
557
591
 
558
592
  RCT_EXPORT_METHOD(setTargetingDataYearOfBirth:(nonnull NSNumber *)yearOfBirth)
@@ -1994,7 +2028,20 @@ RCT_EXPORT_METHOD(setAppOpenAdLocalExtraParameter:(NSString *)adUnitIdentifier :
1994
2028
 
1995
2029
  - (void)logUninitializedAccessError:(NSString *)callingMethod
1996
2030
  {
1997
- [self log: @"ERROR: Failed to execute %@() - please ensure the AppLovin MAX React Native module has been initialized by calling 'AppLovinMAX.initialize(...);'!", callingMethod];
2031
+ [self logUninitializedAccessError: callingMethod withPromiseReject: nil];
2032
+ }
2033
+
2034
+ - (void)logUninitializedAccessError:(NSString *)callingMethod withPromiseReject:(nullable RCTPromiseRejectBlock)reject
2035
+ {
2036
+ NSString *message = [NSString stringWithFormat:@"ERROR: Failed to execute %@() - please ensure the AppLovin MAX React Native module has been initialized by calling 'AppLovinMAX.initialize(...);'!", callingMethod];
2037
+
2038
+ if ( !reject )
2039
+ {
2040
+ NSLog(@"[%@] [%@] %@", SDK_TAG, TAG, message);
2041
+ return;
2042
+ }
2043
+
2044
+ reject(TAG, message, nil);
1998
2045
  }
1999
2046
 
2000
2047
  - (void)log:(NSString *)format, ...
@@ -2266,12 +2313,42 @@ RCT_EXPORT_METHOD(setAppOpenAdLocalExtraParameter:(NSString *)adUnitIdentifier :
2266
2313
  if ( adFormat == MAAdFormat.interstitial )
2267
2314
  {
2268
2315
  MAInterstitialAd *interstitial = [self retrieveInterstitialForAdUnitIdentifier: adUnitIdentifier];
2316
+ if ( !interstitial )
2317
+ {
2318
+ [self log: @"Failed to set Amazon result - unable to find interstitial"];
2319
+ return;
2320
+ }
2321
+
2269
2322
  [interstitial setLocalExtraParameterForKey: key value: result];
2270
2323
  }
2271
- else
2324
+ else if ( adFormat == MAAdFormat.rewarded )
2272
2325
  {
2273
- MAAdView *adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
2274
- [adView setLocalExtraParameterForKey: key value: result];
2326
+ MARewardedAd *rewardedAd = [self retrieveRewardedAdForAdUnitIdentifier: adUnitIdentifier];
2327
+ if ( !rewardedAd )
2328
+ {
2329
+ [self log: @"Failed to set Amazon result - unable to find rewarded ad"];
2330
+ return;
2331
+ }
2332
+
2333
+ [rewardedAd setLocalExtraParameterForKey: key value: result];
2334
+ }
2335
+ else // MAAdFormat.banner or MAAdFormat.mrec
2336
+ {
2337
+ MAAdView *adView = [AppLovinMAXAdView sharedWithAdUnitIdentifier: adUnitIdentifier];
2338
+
2339
+ if ( !adView )
2340
+ {
2341
+ adView = [self retrieveAdViewForAdUnitIdentifier: adUnitIdentifier adFormat: adFormat];
2342
+ }
2343
+
2344
+ if ( adView )
2345
+ {
2346
+ [adView setLocalExtraParameterForKey: key value: result];
2347
+ }
2348
+ else
2349
+ {
2350
+ [self log: @"Failed to set Amazon result - unable to find %@", adFormat];
2351
+ }
2275
2352
  }
2276
2353
  }
2277
2354
 
@@ -7,10 +7,14 @@
7
7
 
8
8
  #import <React/RCTUIManager.h>
9
9
 
10
+ @class MAAdView;
11
+
10
12
  NS_ASSUME_NONNULL_BEGIN
11
13
 
12
14
  @interface AppLovinMAXAdView : UIView
13
15
 
16
+ + (MAAdView *)sharedWithAdUnitIdentifier:(NSString *)adUnitIdentifier;
17
+
14
18
  @end
15
19
 
16
20
  NS_ASSUME_NONNULL_END
@@ -35,6 +35,19 @@
35
35
 
36
36
  @implementation AppLovinMAXAdView
37
37
 
38
+ static NSMutableDictionary<NSString *, MAAdView *> *adViewInstances;
39
+
40
+ + (void)initialize
41
+ {
42
+ [super initialize];
43
+ adViewInstances = [NSMutableDictionary dictionaryWithCapacity: 2];
44
+ }
45
+
46
+ + (MAAdView *)sharedWithAdUnitIdentifier:(NSString *)adUnitIdentifier
47
+ {
48
+ return adViewInstances[adUnitIdentifier];
49
+ }
50
+
38
51
  - (void)setAdUnitId:(NSString *)adUnitId
39
52
  {
40
53
  // Ad Unit ID must be set prior to creating MAAdView
@@ -197,6 +210,8 @@
197
210
  [self.adView.heightAnchor constraintEqualToAnchor: self.heightAnchor],
198
211
  [self.adView.centerXAnchor constraintEqualToAnchor: self.centerXAnchor],
199
212
  [self.adView.centerYAnchor constraintEqualToAnchor: self.centerYAnchor]]];
213
+
214
+ adViewInstances[adUnitId] = self.adView;
200
215
  });
201
216
  }
202
217
 
@@ -211,6 +226,8 @@
211
226
  {
212
227
  [[AppLovinMAX shared] log: @"Unmounting MAAdView: %@", self.adView];
213
228
 
229
+ [adViewInstances removeObjectForKey: self.adUnitId];
230
+
214
231
  self.adView.delegate = nil;
215
232
  self.adView.revenueDelegate = nil;
216
233
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-applovin-max",
3
3
  "author": "AppLovin Corporation",
4
- "version": "6.2.0",
4
+ "version": "6.2.2",
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 => "release_6_2_0" }
14
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_6_2_2" }
15
15
 
16
16
  s.source_files = "ios/AppLovinMAX*.{h,m}"
17
17
 
@@ -4,7 +4,88 @@ import type { Configuration } from './types/Configuration';
4
4
 
5
5
  const NativeAppLovinMAX = NativeModules.AppLovinMAX;
6
6
 
7
- const VERSION = '6.2.0';
7
+ const VERSION = '6.2.2';
8
+
9
+ /**
10
+ * This enum represents the user's geography used to determine the type of consent flow shown to the
11
+ * user.
12
+ */
13
+ export enum ConsentFlowUserGeography {
14
+ /**
15
+ * User's geography is unknown.
16
+ */
17
+ UNKNOWN = 'U',
18
+
19
+ /**
20
+ * The user is in GDPR region.
21
+ */
22
+ GDPR = 'G',
23
+
24
+ /**
25
+ * The user is in a non-GDPR region.
26
+ */
27
+ OTHER = 'O',
28
+ }
29
+
30
+ /**
31
+ * AppLovin SDK-defined app tracking transparency status values (extended to include "unavailable"
32
+ * state on iOS before iOS14).
33
+ */
34
+ export enum AppTrackingStatus {
35
+ /**
36
+ * Device is on iOS before iOS14, AppTrackingTransparency.framework is not available.
37
+ */
38
+ UNAVAILABLE = 'U',
39
+
40
+ /**
41
+ * The user has not yet received an authorization request to authorize access to app-related
42
+ * data that can be used for tracking the user or the device.
43
+ */
44
+ NOT_DETERMINED = 'N',
45
+
46
+ /**
47
+ * Authorization to access app-related data that can be used for tracking the user or the device
48
+ * is restricted.
49
+ */
50
+ RESTRICTED = 'R',
51
+
52
+ /**
53
+ * The user denies authorization to access app-related data that can be used for tracking the
54
+ * user or the device.
55
+ */
56
+ DENIED = 'D',
57
+
58
+ /**
59
+ * The user authorizes access to app-related data that can be used for tracking the user or the
60
+ * device.
61
+ */
62
+ AUTHORIZED = 'A',
63
+ }
64
+
65
+ /**
66
+ * Represents errors for CMP flow.
67
+ */
68
+ export enum CmpError {
69
+ /**
70
+ * Indicates that an unspecified error has occurred.
71
+ */
72
+ UNSPECIFIED = -1,
73
+
74
+ /**
75
+ * Indicates that the CMP has not been integrated correctly.
76
+ */
77
+ INTEGRATION_ERROR = 1,
78
+
79
+ /**
80
+ * Indicates that the CMP form is unavailable.
81
+ */
82
+ FORM_UNAVAILABLE = 2,
83
+
84
+ /**
85
+ * Indicates that the CMP form is not required.
86
+ */
87
+ FORM_NOT_REQUIRED = 3,
88
+ }
8
89
 
9
90
  const initialize = async (sdkKey: string): Promise<Configuration> => {
10
91
  return NativeAppLovinMAX.initialize(VERSION, sdkKey);
package/src/Privacy.ts CHANGED
@@ -3,60 +3,4 @@ import type { PrivacyType } from './types/Privacy';
3
3
 
4
4
  const { AppLovinMAX } = NativeModules;
5
5
 
6
- /**
7
- * This enum represents the user's geography used to determine the type of consent flow shown to the
8
- * user.
9
- */
10
- export enum ConsentFlowUserGeography {
11
- /**
12
- * User's geography is unknown.
13
- */
14
- UNKNOWN = 'U',
15
-
16
- /**
17
- * The user is in GDPR region.
18
- */
19
- GDPR = 'G',
20
-
21
- /**
22
- * The user is in a non-GDPR region.
23
- */
24
- OTHER = 'O',
25
- }
26
-
27
- /**
28
- * AppLovin SDK-defined app tracking transparency status values (extended to include "unavailable"
29
- * state on iOS before iOS14).
30
- */
31
- export enum AppTrackingStatus {
32
- /**
33
- * Device is on iOS before iOS14, AppTrackingTransparency.framework is not available.
34
- */
35
- UNAVAILABLE = 'U',
36
-
37
- /**
38
- * The user has not yet received an authorization request to authorize access to app-related
39
- * data that can be used for tracking the user or the device.
40
- */
41
- NOT_DETERMINED = 'N',
42
-
43
- /**
44
- * Authorization to access app-related data that can be used for tracking the user or the device
45
- * is restricted.
46
- */
47
- RESTRICTED = 'R',
48
-
49
- /**
50
- * The user denies authorization to access app-related data that can be used for tracking the
51
- * user or the device.
52
- */
53
- DENIED = 'D',
54
-
55
- /**
56
- * The user authorizes access to app-related data that can be used for tracking the user or the
57
- * device.
58
- */
59
- AUTHORIZED = 'A',
60
- }
61
-
62
6
  export const Privacy: PrivacyType = AppLovinMAX;
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { default, AppLovinMAX } from './AppLovinMAX';
2
- export { Privacy, ConsentFlowUserGeography, AppTrackingStatus } from './Privacy';
1
+ export { default, AppLovinMAX, ConsentFlowUserGeography, AppTrackingStatus, CmpError } from './AppLovinMAX';
2
+ export { Privacy } from './Privacy';
3
3
  export { TargetingData, AdContentRating, UserGender } from './TargetingData';
4
4
  export { InterstitialAd } from './InterstitialAd';
5
5
  export { RewardedAd } from './RewardedAd';
@@ -1,4 +1,5 @@
1
1
  import type { Configuration } from './Configuration';
2
+ import type { ConsentFlowUserGeography, CmpError } from '../AppLovinMAX';
2
3
 
3
4
  /**
4
5
  * Represents the AppLovinMAX module.
@@ -90,4 +91,61 @@ export type AppLovinMAXType = {
90
91
  * @param enabled Defaults to true.
91
92
  */
92
93
  setLocationCollectionEnabled(enabled: boolean): void;
94
+
95
+ /**
96
+ * @deprecated Use {@link setTermsAndPrivacyPolicyFlowEnabled()} instead.
97
+ *
98
+ * Enables the MAX Terms Flow.
99
+ *
100
+ * @param enabled true to enable the MAX Terms Flow.
101
+ */
102
+ setConsentFlowEnabled(enabled: boolean): void;
103
+
104
+ /**
105
+ * Enables the MAX Terms and Privacy Policy Flow.
106
+ *
107
+ * @param enabled true to enable the MAX Terms and Privacy Policy Flow.
108
+ */
109
+ setTermsAndPrivacyPolicyFlowEnabled(enabled: boolean): void;
110
+
111
+ /**
112
+ * The URL of your company’s privacy policy, as a string. This is required in order to enable
113
+ * the Terms Flow.
114
+ *
115
+ * @param urlString The URL string to point your company’s privacy policy.
116
+ */
117
+ setPrivacyPolicyUrl(urlString: string): void;
118
+
119
+ /**
120
+ * The URL of your company’s terms of service, as a string. This is optional; you can enable
121
+ * the Terms Flow with or without it.
122
+ *
123
+ * @param urlString The URL string to point your company’s terms of service.
124
+ */
125
+ setTermsOfServiceUrl(urlString: string): void;
126
+
127
+ /**
128
+ * Set debug user geography. You may use this to test CMP flow by setting this to {@link ConsentFlowUserGeography.GDPR}.
129
+ *
130
+ * @note The debug geography is used only when the app is in debug mode.
131
+ */
132
+ setConsentFlowDebugUserGeography(userGeography: ConsentFlowUserGeography): void;
133
+
134
+ /**
135
+ * Shows the CMP flow to an existing user.
136
+ * Note that this resets the user’s existing consent information.
137
+ *
138
+ * The function returns when the flow finishes showing. On success, returns null. On failure,
139
+ * returns one of the {@link CmpError} codes.
140
+ *
141
+ * @return {Promise<CmpError|null>}
142
+ */
143
+ showCmpForExistingUser(): Promise<CmpError | null>;
144
+
145
+ /**
146
+ * Returns true if a supported CMP SDK is detected.
147
+ *
148
+ * @return {boolean}
149
+ */
150
+ hasSupportedCmp(): Promise<boolean>;
93
151
  };
@@ -1,4 +1,4 @@
1
- import type { ConsentFlowUserGeography, AppTrackingStatus } from '../Privacy';
1
+ import type { ConsentFlowUserGeography, AppTrackingStatus } from '../AppLovinMAX';
2
2
 
3
3
  /**
4
4
  * Encapsulates data for the AppLovinMAX SDK configuration.
@@ -1,5 +1,3 @@
1
- import type { ConsentFlowUserGeography } from '../Privacy';
2
-
3
1
  export type PrivacyType = {
4
2
  /**********************************************************************************/
5
3
  /* Privacy */
@@ -40,47 +38,4 @@ export type PrivacyType = {
40
38
  * Checks if the user opted out of the sale of their personal information.
41
39
  */
42
40
  isDoNotSell(): Promise<boolean>;
43
-
44
- /**********************************************************************************/
45
- /* TERM FLow */
46
- /**********************************************************************************/
47
-
48
- /**
49
- * @deprecated Use {@link setTermsAndPrivacyPolicyFlowEnabled()} instead.
50
- *
51
- * Enables the MAX Terms Flow.
52
- *
53
- * @param enabled true to enable the MAX Terms Flow.
54
- */
55
- setConsentFlowEnabled(enabled: boolean): void;
56
-
57
- /**
58
- * Enables the MAX Terms and Privacy Policy Flow.
59
- *
60
- * @param enabled true to enable the MAX Terms and Privacy Policy Flow.
61
- */
62
- setTermsAndPrivacyPolicyFlowEnabled(enabled: boolean): void;
63
-
64
- /**
65
- * The URL of your company’s privacy policy, as a string. This is required in order to enable
66
- * the Terms Flow.
67
- *
68
- * @param urlString The URL string to point your company’s privacy policy.
69
- */
70
- setPrivacyPolicyUrl(urlString: string): void;
71
-
72
- /**
73
- * The URL of your company’s terms of service, as a string. This is optional; you can enable
74
- * the Terms Flow with or without it.
75
- *
76
- * @param urlString The URL string to point your company’s terms of service.
77
- */
78
- setTermsOfServiceUrl(urlString: string): void;
79
-
80
- /**
81
- * Set debug user geography. You may use this to test CMP flow by setting this to {@link ConsentFlowUserGeography.GDPR}.
82
- *
83
- * @note The debug geography is used only when the app is in debug mode.
84
- */
85
- setConsentFlowDebugUserGeography(userGeography: ConsentFlowUserGeography): void;
86
41
  };
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Bucket
3
- uuid = "8322C692-8067-489C-89A1-217F139F4039"
4
- type = "0"
5
- version = "2.0">
6
- <Breakpoints>
7
- <BreakpointProxy
8
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
9
- <BreakpointContent
10
- uuid = "1DACA5BD-D4D2-4CD6-BEFD-D951963D77E1"
11
- shouldBeEnabled = "No"
12
- ignoreCount = "0"
13
- continueAfterRunningActions = "No"
14
- filePath = "AppLovinMAX.m"
15
- startingColumnNumber = "9223372036854775807"
16
- endingColumnNumber = "9223372036854775807"
17
- startingLineNumber = "1304"
18
- endingLineNumber = "1304"
19
- landmarkName = "-positionAdViewForAdUnitIdentifier:adFormat:"
20
- landmarkType = "7">
21
- </BreakpointContent>
22
- </BreakpointProxy>
23
- </Breakpoints>
24
- </Bucket>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/src.iml" filepath="$PROJECT_DIR$/.idea/src.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/src/.idea/src.iml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$" />
5
- <orderEntry type="inheritedJdk" />
6
- <orderEntry type="sourceFolder" forTests="false" />
7
- </component>
8
- </module>
package/src/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
- </component>
6
- </project>