react-native-applovin-max 9.0.0 → 9.2.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 +3 -3
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +4 -10
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +17 -8
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModuleImpl.java +36 -14
- package/android/src/newarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
- package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
- package/ios/AppLovinMAX.mm +36 -13
- package/ios/AppLovinMAXAdView.h +1 -0
- package/ios/AppLovinMAXAdView.mm +3 -9
- package/ios/AppLovinMAXAdViewUIComponent.h +1 -2
- package/ios/AppLovinMAXAdViewUIComponent.mm +18 -10
- package/lib/commonjs/AdView.js +63 -79
- package/lib/commonjs/AdView.js.map +1 -1
- package/lib/commonjs/AppLovinMAX.js +43 -29
- package/lib/commonjs/AppLovinMAX.js.map +1 -1
- package/lib/commonjs/BannerAd.js +2 -3
- package/lib/commonjs/BannerAd.js.map +1 -1
- package/lib/commonjs/ErrorCode.js +24 -31
- package/lib/commonjs/ErrorCode.js.map +1 -1
- package/lib/commonjs/EventEmitter.js +22 -1
- package/lib/commonjs/EventEmitter.js.map +1 -1
- package/lib/commonjs/Utils.js +22 -4
- package/lib/commonjs/Utils.js.map +1 -1
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdView.js +34 -24
- package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js +85 -43
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js +30 -2
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js +27 -0
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js +23 -0
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js +7 -0
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js.map +1 -1
- package/lib/commonjs/types/AdInfo.js +13 -16
- package/lib/commonjs/types/AdInfo.js.map +1 -1
- package/lib/module/AdView.js +62 -77
- package/lib/module/AdView.js.map +1 -1
- package/lib/module/AppLovinMAX.js +44 -29
- package/lib/module/AppLovinMAX.js.map +1 -1
- package/lib/module/BannerAd.js +2 -3
- package/lib/module/BannerAd.js.map +1 -1
- package/lib/module/ErrorCode.js +24 -31
- package/lib/module/ErrorCode.js.map +1 -1
- package/lib/module/EventEmitter.js +22 -1
- package/lib/module/EventEmitter.js.map +1 -1
- package/lib/module/Utils.js +22 -4
- package/lib/module/Utils.js.map +1 -1
- package/lib/module/nativeAd/NativeAdView.js +34 -21
- package/lib/module/nativeAd/NativeAdView.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewComponents.js +87 -40
- package/lib/module/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewProvider.js +30 -0
- package/lib/module/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js +28 -0
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -1
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js +24 -0
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -1
- package/lib/module/specs/NativeAppLovinMAXModule.js +9 -0
- package/lib/module/specs/NativeAppLovinMAXModule.js.map +1 -1
- package/lib/module/types/AdInfo.js +13 -16
- package/lib/module/types/AdInfo.js.map +1 -1
- package/lib/typescript/src/AdView.d.ts +27 -21
- package/lib/typescript/src/AdView.d.ts.map +1 -1
- package/lib/typescript/src/AppLovinMAX.d.ts +22 -21
- package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -1
- package/lib/typescript/src/BannerAd.d.ts.map +1 -1
- package/lib/typescript/src/ErrorCode.d.ts +24 -31
- package/lib/typescript/src/ErrorCode.d.ts.map +1 -1
- package/lib/typescript/src/EventEmitter.d.ts +16 -0
- package/lib/typescript/src/EventEmitter.d.ts.map +1 -1
- package/lib/typescript/src/Utils.d.ts +15 -0
- package/lib/typescript/src/Utils.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts +15 -7
- package/lib/typescript/src/nativeAd/NativeAdView.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts +65 -1
- package/lib/typescript/src/nativeAd/NativeAdViewComponents.d.ts.map +1 -1
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts +17 -0
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts.map +1 -1
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts +45 -1
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts +57 -6
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts +13 -3
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts.map +1 -1
- package/lib/typescript/src/types/AdEvent.d.ts +10 -4
- package/lib/typescript/src/types/AdEvent.d.ts.map +1 -1
- package/lib/typescript/src/types/AdInfo.d.ts +78 -85
- package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
- package/lib/typescript/src/types/AdProps.d.ts +14 -15
- package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
- package/lib/typescript/src/types/AdViewProps.d.ts +32 -29
- package/lib/typescript/src/types/AdViewProps.d.ts.map +1 -1
- package/lib/typescript/src/types/AppLovinMAX.d.ts +50 -53
- package/lib/typescript/src/types/AppLovinMAX.d.ts.map +1 -1
- package/lib/typescript/src/types/BannerAd.d.ts +24 -18
- package/lib/typescript/src/types/BannerAd.d.ts.map +1 -1
- package/lib/typescript/src/types/CMPError.d.ts +7 -4
- package/lib/typescript/src/types/CMPError.d.ts.map +1 -1
- package/lib/typescript/src/types/Configuration.d.ts +12 -14
- package/lib/typescript/src/types/Configuration.d.ts.map +1 -1
- package/lib/typescript/src/types/FullscreenAd.d.ts +39 -46
- package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -1
- package/lib/typescript/src/types/MRecAd.d.ts +7 -3
- package/lib/typescript/src/types/MRecAd.d.ts.map +1 -1
- package/lib/typescript/src/types/NativeAd.d.ts +12 -11
- package/lib/typescript/src/types/NativeAd.d.ts.map +1 -1
- package/lib/typescript/src/types/NativeAdViewProps.d.ts +4 -3
- package/lib/typescript/src/types/NativeAdViewProps.d.ts.map +1 -1
- package/lib/typescript/src/types/Privacy.d.ts +13 -6
- package/lib/typescript/src/types/Privacy.d.ts.map +1 -1
- package/lib/typescript/src/types/RewardedAd.d.ts +7 -5
- package/lib/typescript/src/types/RewardedAd.d.ts.map +1 -1
- package/lib/typescript/src/types/ViewAd.d.ts +46 -50
- package/lib/typescript/src/types/ViewAd.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-applovin-max.podspec +2 -2
- package/src/AdView.tsx +64 -82
- package/src/AppLovinMAX.ts +39 -29
- package/src/BannerAd.ts +2 -3
- package/src/ErrorCode.ts +24 -31
- package/src/EventEmitter.ts +20 -2
- package/src/Utils.ts +20 -1
- package/src/nativeAd/NativeAdView.tsx +31 -21
- package/src/nativeAd/NativeAdViewComponents.tsx +97 -38
- package/src/nativeAd/NativeAdViewProvider.tsx +23 -0
- package/src/specs/AppLovinMAXAdViewNativeComponent.ts +62 -1
- package/src/specs/AppLovinMAXNativeAdViewNativeComponent.ts +70 -6
- package/src/specs/NativeAppLovinMAXModule.ts +77 -56
- package/src/types/AdEvent.ts +10 -4
- package/src/types/AdInfo.ts +78 -85
- package/src/types/AdProps.ts +14 -15
- package/src/types/AdViewProps.ts +33 -29
- package/src/types/AppLovinMAX.ts +50 -53
- package/src/types/BannerAd.ts +24 -18
- package/src/types/CMPError.ts +7 -4
- package/src/types/Configuration.ts +12 -14
- package/src/types/FullscreenAd.ts +39 -46
- package/src/types/MRecAd.ts +7 -3
- package/src/types/NativeAd.ts +12 -11
- package/src/types/NativeAdViewProps.ts +4 -3
- package/src/types/Privacy.ts +13 -6
- package/src/types/RewardedAd.ts +7 -5
- package/src/types/ViewAd.ts +46 -50
package/src/types/Privacy.ts
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides methods to manage user privacy settings for AppLovin MAX.
|
|
3
|
+
*/
|
|
1
4
|
export type PrivacyType = {
|
|
2
5
|
/**
|
|
3
|
-
* Sets whether
|
|
6
|
+
* Sets whether the user has granted consent for data collection and sharing.
|
|
4
7
|
*
|
|
5
|
-
* @param hasUserConsent true if the user provided consent
|
|
8
|
+
* @param hasUserConsent - `true` if the user has provided consent.
|
|
6
9
|
*/
|
|
7
10
|
setHasUserConsent(hasUserConsent: boolean): void;
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
|
-
* Checks
|
|
13
|
+
* Checks whether the user has granted consent for information sharing.
|
|
14
|
+
*
|
|
15
|
+
* @returns A promise that resolves to `true` if the user has granted consent.
|
|
11
16
|
*/
|
|
12
17
|
hasUserConsent(): Promise<boolean>;
|
|
13
18
|
|
|
14
19
|
/**
|
|
15
|
-
* Sets whether
|
|
20
|
+
* Sets whether the user has opted out of the sale of their personal information.
|
|
16
21
|
*
|
|
17
|
-
* @param doNotSell true if the user opted out of
|
|
22
|
+
* @param doNotSell - `true` if the user opted out of personal data sale.
|
|
18
23
|
*/
|
|
19
24
|
setDoNotSell(doNotSell: boolean): void;
|
|
20
25
|
|
|
21
26
|
/**
|
|
22
|
-
* Checks
|
|
27
|
+
* Checks whether the user has opted out of the sale of their personal information.
|
|
28
|
+
*
|
|
29
|
+
* @returns A promise that resolves to `true` if the user has opted out.
|
|
23
30
|
*/
|
|
24
31
|
isDoNotSell(): Promise<boolean>;
|
|
25
32
|
};
|
package/src/types/RewardedAd.ts
CHANGED
|
@@ -2,18 +2,20 @@ import type { AdEventListener } from './AdEvent';
|
|
|
2
2
|
import type { AdRewardInfo } from './AdInfo';
|
|
3
3
|
import type { FullscreenAdType } from './FullscreenAd';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Defines the interface for managing rewarded ads.
|
|
7
|
+
* Extends {@link FullscreenAdType} with reward-specific callbacks.
|
|
8
|
+
*/
|
|
5
9
|
export type RewardedAdType = FullscreenAdType & {
|
|
6
10
|
/**
|
|
7
|
-
*
|
|
8
|
-
* rewards the user.
|
|
11
|
+
* Registers a listener for when a reward is granted to the user.
|
|
9
12
|
*
|
|
10
|
-
* @param listener
|
|
13
|
+
* @param listener - Callback to be notified with {@link AdRewardInfo}.
|
|
11
14
|
*/
|
|
12
15
|
addAdReceivedRewardEventListener(listener: AdEventListener<AdRewardInfo>): void;
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
16
|
-
* the user.
|
|
18
|
+
* Unregisters the reward event listener.
|
|
17
19
|
*/
|
|
18
20
|
removeAdReceivedRewardEventListener(): void;
|
|
19
21
|
};
|
package/src/types/ViewAd.ts
CHANGED
|
@@ -4,159 +4,155 @@ import type { LocalExtraParameterValue } from './AdProps';
|
|
|
4
4
|
import type { AdViewPosition } from '../AdView';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Defines the interface for view-based ads such as Banners and MRECs.
|
|
8
8
|
*/
|
|
9
9
|
export type ViewAdType = {
|
|
10
10
|
/**
|
|
11
|
-
* Destroys the banner
|
|
11
|
+
* Destroys the banner or MREC ad.
|
|
12
12
|
*
|
|
13
|
-
* @param adUnitId The ad unit ID of the ad to destroy.
|
|
13
|
+
* @param adUnitId - The ad unit ID of the ad to destroy.
|
|
14
14
|
*/
|
|
15
15
|
destroyAd(adUnitId: string): void;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Displays the banner or MREC ad.
|
|
19
19
|
*
|
|
20
|
-
* @param adUnitId The ad unit ID of the ad to show.
|
|
20
|
+
* @param adUnitId - The ad unit ID of the ad to show.
|
|
21
21
|
*/
|
|
22
22
|
showAd(adUnitId: string): void;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Hides the banner
|
|
25
|
+
* Hides the banner or MREC ad.
|
|
26
26
|
*
|
|
27
|
-
* @param adUnitId The ad unit ID of the ad to hide.
|
|
27
|
+
* @param adUnitId - The ad unit ID of the ad to hide.
|
|
28
28
|
*/
|
|
29
29
|
hideAd(adUnitId: string): void;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Sets a placement to
|
|
32
|
+
* Sets a placement to associate with the showing ad’s events.
|
|
33
33
|
*
|
|
34
|
-
* @param adUnitId The ad unit ID
|
|
35
|
-
* @param placement The placement
|
|
34
|
+
* @param adUnitId - The ad unit ID.
|
|
35
|
+
* @param placement - The placement name.
|
|
36
36
|
*/
|
|
37
37
|
setPlacement(adUnitId: string, placement: string | null): void;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Sets custom data to
|
|
40
|
+
* Sets custom data to associate with the showing ad’s events.
|
|
41
41
|
*
|
|
42
|
-
* @param adUnitId The ad unit ID
|
|
43
|
-
* @param customData
|
|
42
|
+
* @param adUnitId - The ad unit ID.
|
|
43
|
+
* @param customData - Optional custom string (max 8 KB).
|
|
44
44
|
*/
|
|
45
45
|
setCustomData(adUnitId: string, customData: string | null): void;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Updates the banner
|
|
48
|
+
* Updates the position of the banner or MREC.
|
|
49
49
|
*
|
|
50
|
-
* @param adUnitId The ad unit ID
|
|
51
|
-
* @param bannerPosition
|
|
50
|
+
* @param adUnitId - The ad unit ID.
|
|
51
|
+
* @param bannerPosition - The new position on screen.
|
|
52
52
|
*/
|
|
53
53
|
updatePosition(adUnitId: string, bannerPosition: AdViewPosition): void;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Sets an extra
|
|
56
|
+
* Sets an extra parameter for the ad.
|
|
57
57
|
*
|
|
58
|
-
* @param adUnitId The ad unit ID
|
|
59
|
-
* @param key
|
|
60
|
-
* @param value
|
|
58
|
+
* @param adUnitId - The ad unit ID.
|
|
59
|
+
* @param key - Parameter name.
|
|
60
|
+
* @param value - Parameter value (or `null` to clear it).
|
|
61
61
|
*/
|
|
62
62
|
setExtraParameter(adUnitId: string, key: string, value: string | null): void;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Sets a local extra parameter to be passed to the mediation adapter.
|
|
66
66
|
*
|
|
67
|
-
* @param adUnitId The ad unit ID
|
|
68
|
-
* @param key
|
|
69
|
-
* @param value
|
|
67
|
+
* @param adUnitId - The ad unit ID.
|
|
68
|
+
* @param key - Parameter name.
|
|
69
|
+
* @param value - Parameter value (string, number, boolean, object, or null).
|
|
70
70
|
*/
|
|
71
71
|
setLocalExtraParameter(adUnitId: string, key: string, value: LocalExtraParameterValue): void;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Starts or resumes auto-
|
|
74
|
+
* Starts or resumes auto-refresh for the ad.
|
|
75
75
|
*
|
|
76
|
-
* @param adUnitId The ad unit ID
|
|
76
|
+
* @param adUnitId - The ad unit ID.
|
|
77
77
|
*/
|
|
78
78
|
startAutoRefresh(adUnitId: string): void;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Pauses auto-
|
|
81
|
+
* Pauses auto-refresh for the ad.
|
|
82
82
|
*
|
|
83
|
-
* @param adUnitId The ad unit ID
|
|
83
|
+
* @param adUnitId - The ad unit ID.
|
|
84
84
|
*/
|
|
85
85
|
stopAutoRefresh(adUnitId: string): void;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* Registers a listener for when a new ad is successfully loaded.
|
|
89
89
|
*
|
|
90
|
-
* @param listener
|
|
90
|
+
* @param listener - Callback to be notified with {@link AdInfo}.
|
|
91
91
|
*/
|
|
92
92
|
addAdLoadedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Unregisters the ad loaded listener.
|
|
96
96
|
*/
|
|
97
97
|
removeAdLoadedEventListener(): void;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
* could not load a new ad.
|
|
100
|
+
* Registers a listener for when ad loading fails.
|
|
102
101
|
*
|
|
103
|
-
* @param listener
|
|
102
|
+
* @param listener - Callback to be notified with {@link AdLoadFailedInfo}.
|
|
104
103
|
*/
|
|
105
104
|
addAdLoadFailedEventListener(listener: AdEventListener<AdLoadFailedInfo>): void;
|
|
106
105
|
|
|
107
106
|
/**
|
|
108
|
-
*
|
|
109
|
-
* load a new ad.
|
|
107
|
+
* Unregisters the ad load failure listener.
|
|
110
108
|
*/
|
|
111
109
|
removeAdLoadFailedEventListener(): void;
|
|
112
110
|
|
|
113
111
|
/**
|
|
114
|
-
*
|
|
112
|
+
* Registers a listener for ad click events.
|
|
115
113
|
*
|
|
116
|
-
* @param listener
|
|
114
|
+
* @param listener - Callback to be notified with {@link AdInfo}.
|
|
117
115
|
*/
|
|
118
116
|
addAdClickedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
119
117
|
|
|
120
118
|
/**
|
|
121
|
-
*
|
|
119
|
+
* Unregisters the ad click listener.
|
|
122
120
|
*/
|
|
123
121
|
removeAdClickedEventListener(): void;
|
|
124
122
|
|
|
125
123
|
/**
|
|
126
|
-
*
|
|
124
|
+
* Registers a listener for when the ad collapses (e.g. after expansion).
|
|
127
125
|
*
|
|
128
|
-
* @param listener
|
|
126
|
+
* @param listener - Callback to be notified with {@link AdInfo}.
|
|
129
127
|
*/
|
|
130
128
|
addAdCollapsedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
131
129
|
|
|
132
130
|
/**
|
|
133
|
-
*
|
|
131
|
+
* Unregisters the ad collapsed listener.
|
|
134
132
|
*/
|
|
135
133
|
removeAdCollapsedEventListener(): void;
|
|
136
134
|
|
|
137
135
|
/**
|
|
138
|
-
*
|
|
136
|
+
* Registers a listener for when the ad expands.
|
|
139
137
|
*
|
|
140
|
-
* @param listener
|
|
138
|
+
* @param listener - Callback to be notified with {@link AdInfo}.
|
|
141
139
|
*/
|
|
142
140
|
addAdExpandedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
143
141
|
|
|
144
142
|
/**
|
|
145
|
-
*
|
|
143
|
+
* Unregisters the ad expanded listener.
|
|
146
144
|
*/
|
|
147
145
|
removeAdExpandedEventListener(): void;
|
|
148
146
|
|
|
149
147
|
/**
|
|
150
|
-
*
|
|
151
|
-
* ad revenue to the publisher.
|
|
148
|
+
* Registers a listener for when the ad pays revenue to the publisher.
|
|
152
149
|
*
|
|
153
|
-
* @param listener
|
|
150
|
+
* @param listener - Callback to be notified with {@link AdInfo}.
|
|
154
151
|
*/
|
|
155
152
|
addAdRevenuePaidListener(listener: AdEventListener<AdInfo>): void;
|
|
156
153
|
|
|
157
154
|
/**
|
|
158
|
-
*
|
|
159
|
-
* revenue to the publisher.
|
|
155
|
+
* Unregisters the ad revenue paid listener.
|
|
160
156
|
*/
|
|
161
157
|
removeAdRevenuePaidListener(): void;
|
|
162
158
|
};
|