react-native-applovin-max 7.1.0 → 8.0.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.
Files changed (44) hide show
  1. package/android/build.gradle +3 -3
  2. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdEvents.java +67 -0
  3. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +10 -6
  4. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManager.java +7 -7
  5. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +9 -13
  6. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModule.java +103 -145
  7. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdView.java +6 -6
  8. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +4 -4
  9. package/ios/AppLovinMAX.m +46 -22
  10. package/ios/AppLovinMAXAdView.h +12 -3
  11. package/ios/AppLovinMAXAdView.m +17 -13
  12. package/ios/AppLovinMAXAdViewManager.m +1 -1
  13. package/ios/AppLovinMAXAdViewUIComponent.h +7 -6
  14. package/ios/AppLovinMAXAdViewUIComponent.m +10 -15
  15. package/ios/AppLovinMAXNativeAdView.m +2 -2
  16. package/lib/commonjs/AppLovinMAX.js +1 -1
  17. package/lib/commonjs/ErrorCode.js +49 -0
  18. package/lib/commonjs/ErrorCode.js.map +1 -0
  19. package/lib/commonjs/index.js +8 -0
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/types/AdInfo.js.map +1 -1
  22. package/lib/module/AppLovinMAX.js +1 -1
  23. package/lib/module/ErrorCode.js +43 -0
  24. package/lib/module/ErrorCode.js.map +1 -0
  25. package/lib/module/index.js +1 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/types/AdInfo.js.map +1 -1
  28. package/lib/typescript/src/ErrorCode.d.ts +83 -0
  29. package/lib/typescript/src/ErrorCode.d.ts.map +1 -0
  30. package/lib/typescript/src/index.d.ts +1 -0
  31. package/lib/typescript/src/index.d.ts.map +1 -1
  32. package/lib/typescript/src/types/AdInfo.d.ts +4 -3
  33. package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
  34. package/lib/typescript/src/types/AdProps.d.ts +6 -6
  35. package/lib/typescript/src/types/Privacy.d.ts +0 -10
  36. package/lib/typescript/src/types/Privacy.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/react-native-applovin-max.podspec +2 -2
  39. package/src/AppLovinMAX.ts +1 -1
  40. package/src/ErrorCode.ts +116 -0
  41. package/src/index.ts +1 -0
  42. package/src/types/AdInfo.ts +5 -3
  43. package/src/types/AdProps.ts +6 -6
  44. package/src/types/Privacy.ts +0 -12
@@ -0,0 +1,83 @@
1
+ /**
2
+ * This enum contains various error codes that the SDK can return when a MAX ad fails to load or
3
+ * display.
4
+ */
5
+ export declare enum ErrorCode {
6
+ /**
7
+ * This error code represents an error that could not be categorized into one of the other defined
8
+ * errors. See the message field in the error object for more details.
9
+ */
10
+ UNSPECIFIED,
11
+ /**
12
+ * This error code indicates that MAX returned no eligible ads from any mediated networks for this
13
+ * app/device.
14
+ */
15
+ NO_FILL,
16
+ /**
17
+ * This error code indicates that MAX returned eligible ads from mediated networks, but all ads
18
+ * failed to load. See the adLoadFailureInfo field in the error object for more details.
19
+ */
20
+ AD_LOAD_FAILED,
21
+ /**
22
+ * This error code represents an error that was encountered when showing an ad.
23
+ */
24
+ AD_DISPLAY_FAILED,
25
+ /**
26
+ * This error code indicates that the ad request failed due to a generic network error. See the
27
+ * message field in the error object for more details.
28
+ */
29
+ NETWORK_ERROR,
30
+ /**
31
+ * This error code indicates that the ad request timed out due to a slow internet connection.
32
+ */
33
+ NETWORK_TIMEOUT,
34
+ /**
35
+ * This error code indicates that the ad request failed because the device is not connected to the
36
+ * internet.
37
+ */
38
+ NO_NETWORK,
39
+ /**
40
+ * This error code indicates that you attempted to show a fullscreen ad while another fullscreen ad
41
+ * is still showing.
42
+ */
43
+ FULLSCREEN_AD_ALREADY_SHOWING,
44
+ /**
45
+ * This error code indicates you are attempting to show a fullscreen ad before the one has been
46
+ * loaded.
47
+ */
48
+ FULLSCREEN_AD_NOT_READY,
49
+ /**
50
+ * This error code indicates you attempted to present a fullscreen ad from an invalid view
51
+ * controller.
52
+ * **iOS ONLY**.
53
+ */
54
+ FULLSCREEN_AD_INVALID_VIEW_CONTROLLER,
55
+ /**
56
+ * This error code indicates you are attempting to load a fullscreen ad while another
57
+ * fullscreen ad is already loading.
58
+ */
59
+ FULLSCREEN_AD_ALREADY_LOADING,
60
+ /**
61
+ * This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad
62
+ * is still showing.
63
+ */
64
+ FULLSCREEN_AD_LOAD_WHILE_SHOWING,
65
+ /**
66
+ * This error code indicates that the SDK failed to display an ad because the user has the
67
+ * "Don't Keep Activities" developer setting enabled.
68
+ * **Android ONLY**.
69
+ */
70
+ DONT_KEEP_ACTIVITIES_ENABLED,
71
+ /**
72
+ * This error code indicates that the SDK failed to load an ad because the publisher provided an
73
+ * invalid ad unit identifier.
74
+ *
75
+ * Possible reasons for an invalid ad unit identifier:
76
+ * 1. Ad unit identifier is malformed or does not exist.
77
+ * 2. Ad unit is disabled.
78
+ * 3. Ad unit is not associated with the current app's package name.
79
+ * 4. Ad unit was created within the last 30-60 minutes.
80
+ */
81
+ INVALID_AD_UNIT_ID
82
+ }
83
+ //# sourceMappingURL=ErrorCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../src/ErrorCode.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,oBAAY,SAAS;IACjB;;;OAGG;IACH,WAAwC;IAExC;;;OAGG;IACH,OAAgC;IAEhC;;;OAGG;IACH,cAA8C;IAE9C;;OAEG;IACH,iBAAoD;IAEpD;;;OAGG;IACH,aAA4C;IAE5C;;OAEG;IACH,eAAgD;IAEhD;;;OAGG;IACH,UAAsC;IAEtC;;;OAGG;IACH,6BAA4E;IAE5E;;;OAGG;IACH,uBAAgE;IAEhE;;;;OAIG;IACH,qCAA4F;IAE5F;;;OAGG;IACH,6BAA4E;IAE5E;;;OAGG;IACH,gCAAkF;IAElF;;;;OAIG;IACH,4BAA0E;IAE1E;;;;;;;;;OASG;IACH,kBAAsD;CACzD"}
@@ -1,4 +1,5 @@
1
1
  export { default, AppLovinMAX, ConsentFlowUserGeography, AppTrackingStatus, CMPErrorCode } from './AppLovinMAX';
2
+ export { ErrorCode } from './ErrorCode';
2
3
  export { Privacy } from './Privacy';
3
4
  export { InterstitialAd } from './InterstitialAd';
4
5
  export { RewardedAd } from './RewardedAd';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACH,8BAA8B,EAC9B,8BAA8B,EAC9B,mDAAmD,EACnD,kDAAkD,EAClD,+CAA+C,EAC/C,sDAAsD,GACzD,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC5J,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACH,8BAA8B,EAC9B,8BAA8B,EAC9B,mDAAmD,EACnD,kDAAkD,EAClD,+CAA+C,EAC/C,sDAAsD,GACzD,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC5J,cAAc,SAAS,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { ErrorCode } from '../ErrorCode';
1
2
  /**
2
3
  * Represents an ad that has been served by AppLovin MAX.
3
4
  */
@@ -60,7 +61,7 @@ export type AdLoadFailedInfo = {
60
61
  /**
61
62
  * The error code for the error.
62
63
  */
63
- code: string | null;
64
+ code: ErrorCode;
64
65
  /**
65
66
  * The error message for the error.
66
67
  */
@@ -89,7 +90,7 @@ export type AdDisplayFailedInfo = AdInfo & {
89
90
  /**
90
91
  * The error code for the error.
91
92
  */
92
- code: string | null;
93
+ code: ErrorCode;
93
94
  /**
94
95
  * The error message for the error.
95
96
  */
@@ -230,7 +231,7 @@ export type AdErrorInfo = {
230
231
  /**
231
232
  * The error code for the error.
232
233
  */
233
- code: number;
234
+ code: ErrorCode;
234
235
  /**
235
236
  * The error message for the error.
236
237
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AdInfo.d.ts","sourceRoot":"","sources":["../../../../src/types/AdInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,IAAI,EAAE;QACF,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;CACL,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;OAEG;IACH,2BAA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E,CAAC;IAE1C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,oBAAY,WAAW;IACnB;;;OAGG;IACH,2BAA2B,IAAI;IAE/B;;OAEG;IACH,iBAAiB,IAAI;IAErB;;OAEG;IACH,uBAAuB,IAAI;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC;;OAEG;IACH,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAE1E;;;;OAIG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -4,7 +4,7 @@ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } fro
4
4
  */
5
5
  export type LocalExtraParameterValue = string | number | boolean | object | null;
6
6
  /**
7
- * Defines the base properties for the UI component ads i.e {@link Adview} and {@link NativeAdView}.
7
+ * Defines the base properties for the UI component ads i.e {@link AdView} and {@link NativeAdView}.
8
8
  */
9
9
  export type AdProps = {
10
10
  /**
@@ -35,23 +35,23 @@ export type AdProps = {
35
35
  [key: string]: LocalExtraParameterValue;
36
36
  };
37
37
  /**
38
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it loads a new ad.
38
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it loads a new ad.
39
39
  */
40
40
  onAdLoaded?: (adInfo: AdInfo) => void;
41
41
  /**
42
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it could not load a new ad.
42
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it could not load a new ad.
43
43
  */
44
44
  onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
45
45
  /**
46
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it fails to display the ad.
46
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it fails to display the ad.
47
47
  */
48
48
  onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
49
49
  /**
50
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when the user clicks the ad.
50
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when the user clicks the ad.
51
51
  */
52
52
  onAdClicked?: (adInfo: AdInfo) => void;
53
53
  /**
54
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
54
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
55
55
  */
56
56
  onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
57
57
  };
@@ -11,16 +11,6 @@ export type PrivacyType = {
11
11
  * Checks if user set consent for information sharing.
12
12
  */
13
13
  hasUserConsent(): Promise<boolean>;
14
- /**
15
- * Marks the user as age-restricted (i.e. under 16).
16
- *
17
- * @param isAgeRestrictedUser true if the user is age restricted (i.e. under 16).
18
- */
19
- setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): void;
20
- /**
21
- * Checks if the user is age-restricted.
22
- */
23
- isAgeRestrictedUser(): Promise<boolean>;
24
14
  /**
25
15
  * Sets whether or not the user opted out of the sale of their personal information.
26
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Privacy.d.ts","sourceRoot":"","sources":["../../../../src/types/Privacy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACtB,oFAAoF;IAEpF,oFAAoF;IAEpF;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAEjD;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;;;OAIG;IACH,sBAAsB,CAAC,mBAAmB,EAAE,OAAO,GAAG,IAAI,CAAC;IAE3D;;OAEG;IACH,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"Privacy.d.ts","sourceRoot":"","sources":["../../../../src/types/Privacy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACtB,oFAAoF;IAEpF,oFAAoF;IAEpF;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAEjD;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC;;;;OAIG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACnC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-applovin-max",
3
3
  "author": "AppLovin Corporation <support@applovin.com> (https://applovin.com)",
4
- "version": "7.1.0",
4
+ "version": "8.0.0",
5
5
  "description": "AppLovin MAX React Native Plugin for Android and iOS",
6
6
  "main": "lib/commonjs/index",
7
7
  "module": "lib/module/index",
@@ -12,11 +12,11 @@ Pod::Spec.new do |s|
12
12
  s.authors = package["author"]
13
13
 
14
14
  s.platforms = { :ios => min_ios_version_supported }
15
- s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_7_1_0" }
15
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_8_0_0" }
16
16
 
17
17
  s.source_files = "ios/AppLovinMAX*.{h,m}"
18
18
 
19
- s.dependency "AppLovinSDK", "12.6.0"
19
+ s.dependency "AppLovinSDK", "13.0.0"
20
20
 
21
21
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22
22
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -4,7 +4,7 @@ import type { Configuration } from './types/Configuration';
4
4
 
5
5
  const NativeAppLovinMAX = NativeModules.AppLovinMAX;
6
6
 
7
- const VERSION = '7.1.0';
7
+ const VERSION = '8.0.0';
8
8
 
9
9
  /**
10
10
  * This enum represents the user's geography used to determine the type of consent flow shown to the
@@ -0,0 +1,116 @@
1
+ import { NativeModules } from 'react-native';
2
+
3
+ const { AppLovinMAX } = NativeModules;
4
+
5
+ const {
6
+ MAX_ERROR_CODE_UNSPECIFIED,
7
+ MAX_ERROR_CODE_NO_FILL,
8
+ MAX_ERROR_CODE_AD_LOAD_FAILED,
9
+ MAX_ERROR_CODE_AD_DISPLAY_FAILED,
10
+ MAX_ERROR_CODE_NETWORK_ERROR,
11
+ MAX_ERROR_CODE_NETWORK_TIMEOUT,
12
+ MAX_ERROR_CODE_NO_NETWORK,
13
+ MAX_ERROR_CODE_FULLSCREEN_AD_ALREADY_SHOWING,
14
+ MAX_ERROR_CODE_FULLSCREEN_AD_NOT_READY,
15
+ MAX_ERROR_CODE_FULLSCREEN_AD_INVALID_VIEW_CONTROLLER,
16
+ MAX_ERROR_CODE_FULLSCREEN_AD_ALREADY_LOADING,
17
+ MAX_ERROR_CODE_FULLSCREEN_AD_LOAD_WHILE_SHOWING,
18
+ MAX_ERROR_CODE_DONT_KEEP_ACTIVITIES_ENABLED,
19
+ MAX_ERROR_CODE_INVALID_AD_UNIT_ID,
20
+ } = AppLovinMAX.getConstants();
21
+
22
+ /**
23
+ * This enum contains various error codes that the SDK can return when a MAX ad fails to load or
24
+ * display.
25
+ */
26
+ export enum ErrorCode {
27
+ /**
28
+ * This error code represents an error that could not be categorized into one of the other defined
29
+ * errors. See the message field in the error object for more details.
30
+ */
31
+ UNSPECIFIED = MAX_ERROR_CODE_UNSPECIFIED,
32
+
33
+ /**
34
+ * This error code indicates that MAX returned no eligible ads from any mediated networks for this
35
+ * app/device.
36
+ */
37
+ NO_FILL = MAX_ERROR_CODE_NO_FILL,
38
+
39
+ /**
40
+ * This error code indicates that MAX returned eligible ads from mediated networks, but all ads
41
+ * failed to load. See the adLoadFailureInfo field in the error object for more details.
42
+ */
43
+ AD_LOAD_FAILED = MAX_ERROR_CODE_AD_LOAD_FAILED,
44
+
45
+ /**
46
+ * This error code represents an error that was encountered when showing an ad.
47
+ */
48
+ AD_DISPLAY_FAILED = MAX_ERROR_CODE_AD_DISPLAY_FAILED,
49
+
50
+ /**
51
+ * This error code indicates that the ad request failed due to a generic network error. See the
52
+ * message field in the error object for more details.
53
+ */
54
+ NETWORK_ERROR = MAX_ERROR_CODE_NETWORK_ERROR,
55
+
56
+ /**
57
+ * This error code indicates that the ad request timed out due to a slow internet connection.
58
+ */
59
+ NETWORK_TIMEOUT = MAX_ERROR_CODE_NETWORK_TIMEOUT,
60
+
61
+ /**
62
+ * This error code indicates that the ad request failed because the device is not connected to the
63
+ * internet.
64
+ */
65
+ NO_NETWORK = MAX_ERROR_CODE_NO_NETWORK,
66
+
67
+ /**
68
+ * This error code indicates that you attempted to show a fullscreen ad while another fullscreen ad
69
+ * is still showing.
70
+ */
71
+ FULLSCREEN_AD_ALREADY_SHOWING = MAX_ERROR_CODE_FULLSCREEN_AD_ALREADY_SHOWING,
72
+
73
+ /**
74
+ * This error code indicates you are attempting to show a fullscreen ad before the one has been
75
+ * loaded.
76
+ */
77
+ FULLSCREEN_AD_NOT_READY = MAX_ERROR_CODE_FULLSCREEN_AD_NOT_READY,
78
+
79
+ /**
80
+ * This error code indicates you attempted to present a fullscreen ad from an invalid view
81
+ * controller.
82
+ * **iOS ONLY**.
83
+ */
84
+ FULLSCREEN_AD_INVALID_VIEW_CONTROLLER = MAX_ERROR_CODE_FULLSCREEN_AD_INVALID_VIEW_CONTROLLER,
85
+
86
+ /**
87
+ * This error code indicates you are attempting to load a fullscreen ad while another
88
+ * fullscreen ad is already loading.
89
+ */
90
+ FULLSCREEN_AD_ALREADY_LOADING = MAX_ERROR_CODE_FULLSCREEN_AD_ALREADY_LOADING,
91
+
92
+ /**
93
+ * This error code indicates you are attempting to load a fullscreen ad while another fullscreen ad
94
+ * is still showing.
95
+ */
96
+ FULLSCREEN_AD_LOAD_WHILE_SHOWING = MAX_ERROR_CODE_FULLSCREEN_AD_LOAD_WHILE_SHOWING,
97
+
98
+ /**
99
+ * This error code indicates that the SDK failed to display an ad because the user has the
100
+ * "Don't Keep Activities" developer setting enabled.
101
+ * **Android ONLY**.
102
+ */
103
+ DONT_KEEP_ACTIVITIES_ENABLED = MAX_ERROR_CODE_DONT_KEEP_ACTIVITIES_ENABLED,
104
+
105
+ /**
106
+ * This error code indicates that the SDK failed to load an ad because the publisher provided an
107
+ * invalid ad unit identifier.
108
+ *
109
+ * Possible reasons for an invalid ad unit identifier:
110
+ * 1. Ad unit identifier is malformed or does not exist.
111
+ * 2. Ad unit is disabled.
112
+ * 3. Ad unit is not associated with the current app's package name.
113
+ * 4. Ad unit was created within the last 30-60 minutes.
114
+ */
115
+ INVALID_AD_UNIT_ID = MAX_ERROR_CODE_INVALID_AD_UNIT_ID,
116
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default, AppLovinMAX, ConsentFlowUserGeography, AppTrackingStatus, CMPErrorCode } from './AppLovinMAX';
2
+ export { ErrorCode } from './ErrorCode';
2
3
  export { Privacy } from './Privacy';
3
4
  export { InterstitialAd } from './InterstitialAd';
4
5
  export { RewardedAd } from './RewardedAd';
@@ -1,3 +1,5 @@
1
+ import type { ErrorCode } from '../ErrorCode';
2
+
1
3
  /**
2
4
  * Represents an ad that has been served by AppLovin MAX.
3
5
  */
@@ -70,7 +72,7 @@ export type AdLoadFailedInfo = {
70
72
  /**
71
73
  * The error code for the error.
72
74
  */
73
- code: string | null;
75
+ code: ErrorCode;
74
76
 
75
77
  /**
76
78
  * The error message for the error.
@@ -105,7 +107,7 @@ export type AdDisplayFailedInfo = AdInfo & {
105
107
  /**
106
108
  * The error code for the error.
107
109
  */
108
- code: string | null;
110
+ code: ErrorCode;
109
111
 
110
112
  /**
111
113
  * The error message for the error.
@@ -271,7 +273,7 @@ export type AdErrorInfo = {
271
273
  /**
272
274
  * The error code for the error.
273
275
  */
274
- code: number;
276
+ code: ErrorCode;
275
277
 
276
278
  /**
277
279
  * The error message for the error.
@@ -6,7 +6,7 @@ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo, AdRevenueInfo } fro
6
6
  export type LocalExtraParameterValue = string | number | boolean | object | null;
7
7
 
8
8
  /**
9
- * Defines the base properties for the UI component ads i.e {@link Adview} and {@link NativeAdView}.
9
+ * Defines the base properties for the UI component ads i.e {@link AdView} and {@link NativeAdView}.
10
10
  */
11
11
  export type AdProps = {
12
12
  /**
@@ -38,27 +38,27 @@ export type AdProps = {
38
38
  localExtraParameters?: { [key: string]: LocalExtraParameterValue };
39
39
 
40
40
  /**
41
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it loads a new ad.
41
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it loads a new ad.
42
42
  */
43
43
  onAdLoaded?: (adInfo: AdInfo) => void;
44
44
 
45
45
  /**
46
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it could not load a new ad.
46
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it could not load a new ad.
47
47
  */
48
48
  onAdLoadFailed?: (error: AdLoadFailedInfo) => void;
49
49
 
50
50
  /**
51
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it fails to display the ad.
51
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it fails to display the ad.
52
52
  */
53
53
  onAdDisplayFailed?: (error: AdDisplayFailedInfo) => void;
54
54
 
55
55
  /**
56
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when the user clicks the ad.
56
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when the user clicks the ad.
57
57
  */
58
58
  onAdClicked?: (adInfo: AdInfo) => void;
59
59
 
60
60
  /**
61
- * A callback fuction that {@link Adview} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
61
+ * A callback fuction that {@link AdView} or {@link NativeAdView} fires when it pays ad revenue to the publisher.
62
62
  */
63
63
  onAdRevenuePaid?: (adInfo: AdRevenueInfo) => void;
64
64
  };
@@ -15,18 +15,6 @@ export type PrivacyType = {
15
15
  */
16
16
  hasUserConsent(): Promise<boolean>;
17
17
 
18
- /**
19
- * Marks the user as age-restricted (i.e. under 16).
20
- *
21
- * @param isAgeRestrictedUser true if the user is age restricted (i.e. under 16).
22
- */
23
- setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): void;
24
-
25
- /**
26
- * Checks if the user is age-restricted.
27
- */
28
- isAgeRestrictedUser(): Promise<boolean>;
29
-
30
18
  /**
31
19
  * Sets whether or not the user opted out of the sale of their personal information.
32
20
  *