react-native-applovin-max 6.0.1 → 6.0.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.
- package/android/build.gradle +3 -3
- package/ios/Podfile +1 -1
- package/ios/Podfile.lock +4 -4
- package/package.json +5 -1
- package/react-native-applovin-max.podspec +2 -2
- package/src/AdView.tsx +55 -43
- package/src/AppLovinMAX.ts +8 -10
- package/src/AppOpenAd.ts +28 -31
- package/src/BannerAd.ts +36 -35
- package/src/EventEmitter.ts +9 -9
- package/src/InterstitialAd.ts +31 -32
- package/src/MRecAd.ts +32 -31
- package/src/Privacy.ts +2 -2
- package/src/RewardedAd.ts +31 -34
- package/src/TargetingData.ts +34 -23
- package/src/index.ts +12 -12
- package/src/nativeAd/NativeAdView.tsx +63 -55
- package/src/nativeAd/NativeAdViewComponents.tsx +36 -28
- package/src/nativeAd/NativeAdViewProvider.tsx +15 -13
- package/src/types/AdEvent.ts +2 -13
- package/src/types/AdInfo.ts +6 -18
- package/src/types/AdProps.ts +7 -3
- package/src/types/AdViewProps.ts +4 -5
- package/src/types/AppLovinMAX.ts +7 -8
- package/src/types/AppOpenAd.ts +1 -1
- package/src/types/BannerAd.ts +8 -9
- package/src/types/Configuration.ts +1 -3
- package/src/types/FullscreenAd.ts +19 -19
- package/src/types/InterstitialAd.ts +1 -1
- package/src/types/MRecAd.ts +3 -4
- package/src/types/NativeAd.ts +1 -2
- package/src/types/NativeAdViewProps.ts +1 -2
- package/src/types/Privacy.ts +7 -13
- package/src/types/RewardedAd.ts +4 -5
- package/src/types/TargetingData.ts +1 -2
- package/src/types/ViewAd.ts +20 -20
- package/src/types/index.ts +4 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type { AdEventListener } from
|
|
2
|
-
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from
|
|
1
|
+
import type { AdEventListener } from './AdEvent';
|
|
2
|
+
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo, AdDisplayFailedInfo } from './AdInfo';
|
|
3
|
+
import type { LocalExtraParameterValue } from './AdProps';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Defines a full-screen ad (i.e Intestitial / Rewarded / AppOpen)
|
|
6
7
|
*/
|
|
7
8
|
export type FullscreenAdType = {
|
|
8
|
-
|
|
9
9
|
/**
|
|
10
10
|
* Whether or not this ad is ready to be shown.
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* @param adUnitId The ad unit ID of the ad to check whether it is ready to be shown.
|
|
13
13
|
*/
|
|
14
14
|
isAdReady(adUnitId: string): Promise<boolean>;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Loads an interstitial ad.
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
19
|
* @param adUnitId The ad unit ID to load an ad for.
|
|
20
20
|
*/
|
|
21
21
|
loadAd(adUnitId: string): void;
|
|
@@ -23,7 +23,7 @@ export type FullscreenAdType = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Shows the loaded interstitial ad, optionallly for a given placement and custom data to tie ad
|
|
25
25
|
* events to.
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* @param adUnitId The ad unit ID of the ad to show.
|
|
28
28
|
* @param placement The placement to tie the showing ad's events to.
|
|
29
29
|
* @param customData The custom data to tie the showing ad's events to. Maximum size is 8KB.
|
|
@@ -32,7 +32,7 @@ export type FullscreenAdType = {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Sets an extra key/value parameter for the ad.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @param adUnitId The ad unit ID of the ad to set a parameter for.
|
|
37
37
|
* @param key Parameter key.
|
|
38
38
|
* @param value Parameter value.
|
|
@@ -46,11 +46,11 @@ export type FullscreenAdType = {
|
|
|
46
46
|
* @param key Parameter key.
|
|
47
47
|
* @param value Parameter value.
|
|
48
48
|
*/
|
|
49
|
-
setLocalExtraParameter(adUnitId: string, key: string, value:
|
|
49
|
+
setLocalExtraParameter(adUnitId: string, key: string, value: LocalExtraParameterValue): void;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Adds the specified event listener to receive {@link AdInfo} when a full-screen ad loads a new ad.
|
|
53
|
-
*
|
|
53
|
+
*
|
|
54
54
|
* @param listener Listener to be notified.
|
|
55
55
|
*/
|
|
56
56
|
addAdLoadedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -63,7 +63,7 @@ export type FullscreenAdType = {
|
|
|
63
63
|
/**
|
|
64
64
|
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when a full-screen ad
|
|
65
65
|
* could not load a new ad.
|
|
66
|
-
*
|
|
66
|
+
*
|
|
67
67
|
* @param listener Listener to be notified.
|
|
68
68
|
*/
|
|
69
69
|
addAdLoadFailedEventListener(listener: AdEventListener<AdLoadFailedInfo>): void;
|
|
@@ -71,12 +71,12 @@ export type FullscreenAdType = {
|
|
|
71
71
|
/**
|
|
72
72
|
* Removes the event listener to receive {@ link adLoadFailedInfo} when a full-screen ad could
|
|
73
73
|
* not load a new ad.
|
|
74
|
-
|
|
74
|
+
*/
|
|
75
75
|
removeAdLoadFailedEventListener(): void;
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
|
|
79
|
-
*
|
|
79
|
+
*
|
|
80
80
|
* @param listener Listener to be notified.
|
|
81
81
|
*/
|
|
82
82
|
addAdClickedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -88,7 +88,7 @@ export type FullscreenAdType = {
|
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Adds the specified event listener to receive {@link AdInfo} when a full-screen ad displays the ad.
|
|
91
|
-
*
|
|
91
|
+
*
|
|
92
92
|
* @param listener Listener to be notified.
|
|
93
93
|
*/
|
|
94
94
|
addAdDisplayedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -101,7 +101,7 @@ export type FullscreenAdType = {
|
|
|
101
101
|
/**
|
|
102
102
|
* Adds the specified event listener to receive {@link AdDisplayFailedInfo} when a full-screen
|
|
103
103
|
* ad fails to display the ad.
|
|
104
|
-
*
|
|
104
|
+
*
|
|
105
105
|
* @param listener Listener to be notified.
|
|
106
106
|
*/
|
|
107
107
|
addAdFailedToDisplayEventListener(listener: AdEventListener<AdDisplayFailedInfo>): void;
|
|
@@ -115,7 +115,7 @@ export type FullscreenAdType = {
|
|
|
115
115
|
/**
|
|
116
116
|
* Adds the specified event listener to receive {@link AdInfo} when a full-screen ad hides the
|
|
117
117
|
* ad.
|
|
118
|
-
*
|
|
118
|
+
*
|
|
119
119
|
* @param listener Listener to be notified.
|
|
120
120
|
*/
|
|
121
121
|
addAdHiddenEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -125,16 +125,16 @@ export type FullscreenAdType = {
|
|
|
125
125
|
*/
|
|
126
126
|
removeAdHiddenEventListener(): void;
|
|
127
127
|
|
|
128
|
-
/**
|
|
129
|
-
* Adds the specified event listener to receive {@link AdRevenueInfo} when a full-screen ad
|
|
128
|
+
/**
|
|
129
|
+
* Adds the specified event listener to receive {@link AdRevenueInfo} when a full-screen ad
|
|
130
130
|
* pays ad revenue to the publisher.
|
|
131
|
-
*
|
|
131
|
+
*
|
|
132
132
|
* @param listener Listener to be notified.
|
|
133
133
|
*/
|
|
134
134
|
addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
* Removes the event listener to receive {@link AdRevenueInfo} when a full-screen ad pays
|
|
137
|
+
* Removes the event listener to receive {@link AdRevenueInfo} when a full-screen ad pays
|
|
138
138
|
* ad revenue to the publisher.
|
|
139
139
|
*/
|
|
140
140
|
removeAdRevenuePaidListener(): void;
|
package/src/types/MRecAd.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { ViewAdType } from
|
|
2
|
-
import type { AdViewPosition } from
|
|
1
|
+
import type { ViewAdType } from './ViewAd';
|
|
2
|
+
import type { AdViewPosition } from '../AdView';
|
|
3
3
|
|
|
4
4
|
export type MRecAdType = ViewAdType & {
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Creates a MREC at the specified position.
|
|
8
|
-
*
|
|
7
|
+
*
|
|
9
8
|
* @param adUnitId The Ad Unit ID to to load ads for.
|
|
10
9
|
* @param position {@link AdViewPosition} position.
|
|
11
10
|
*/
|
package/src/types/NativeAd.ts
CHANGED
package/src/types/Privacy.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
export type PrivacyType = {
|
|
2
|
-
|
|
3
2
|
/**********************************************************************************/
|
|
4
3
|
/* Privacy */
|
|
5
4
|
/**********************************************************************************/
|
|
6
5
|
|
|
7
|
-
/**
|
|
8
|
-
* Shows the user consent dialog to the user by using a dialog in the AppLovinMAX SDK.
|
|
9
|
-
*/
|
|
10
|
-
showConsentDialog(): Promise<void>;
|
|
11
|
-
|
|
12
6
|
/**
|
|
13
7
|
* Sets whether or not the user provided consent for information-sharing with AppLovin.
|
|
14
|
-
*
|
|
8
|
+
*
|
|
15
9
|
* @param hasUserConsent true if the user provided consent for information sharing.
|
|
16
10
|
*/
|
|
17
11
|
setHasUserConsent(hasUserConsent: boolean): void;
|
|
@@ -23,7 +17,7 @@ export type PrivacyType = {
|
|
|
23
17
|
|
|
24
18
|
/**
|
|
25
19
|
* Marks the user as age-restricted (i.e. under 16).
|
|
26
|
-
*
|
|
20
|
+
*
|
|
27
21
|
* @param isAgeRestrictedUser true if the user is age restricted (i.e. under 16).
|
|
28
22
|
*/
|
|
29
23
|
setIsAgeRestrictedUser(isAgeRestrictedUser: boolean): void;
|
|
@@ -35,7 +29,7 @@ export type PrivacyType = {
|
|
|
35
29
|
|
|
36
30
|
/**
|
|
37
31
|
* Sets whether or not the user opted out of the sale of their personal information.
|
|
38
|
-
*
|
|
32
|
+
*
|
|
39
33
|
* @param doNotSell true if the user opted out of the sale of their personal information.
|
|
40
34
|
*/
|
|
41
35
|
setDoNotSell(doNotSell: boolean): void;
|
|
@@ -59,16 +53,16 @@ export type PrivacyType = {
|
|
|
59
53
|
/**
|
|
60
54
|
* The URL of your company’s privacy policy, as a string. This is required in order to enable
|
|
61
55
|
* the Terms Flow.
|
|
62
|
-
*
|
|
56
|
+
*
|
|
63
57
|
* @param urlString The URL string to point your company’s privacy policy.
|
|
64
58
|
*/
|
|
65
59
|
setPrivacyPolicyUrl(urlString: string): Promise<void>;
|
|
66
60
|
|
|
67
61
|
/**
|
|
68
|
-
* The URL of your company’s terms of service, as a string. This is optional; you can enable
|
|
62
|
+
* The URL of your company’s terms of service, as a string. This is optional; you can enable
|
|
69
63
|
* the Terms Flow with or without it.
|
|
70
|
-
*
|
|
71
|
-
* @param urlString The URL string to point your company’s terms of service.
|
|
64
|
+
*
|
|
65
|
+
* @param urlString The URL string to point your company’s terms of service.
|
|
72
66
|
*/
|
|
73
67
|
setTermsOfServiceUrl(urlString: string): Promise<void>;
|
|
74
68
|
};
|
package/src/types/RewardedAd.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { AdEventListener } from
|
|
2
|
-
import type { AdRewardInfo } from
|
|
3
|
-
import type { FullscreenAdType } from
|
|
1
|
+
import type { AdEventListener } from './AdEvent';
|
|
2
|
+
import type { AdRewardInfo } from './AdInfo';
|
|
3
|
+
import type { FullscreenAdType } from './FullscreenAd';
|
|
4
4
|
|
|
5
5
|
export type RewardedAdType = FullscreenAdType & {
|
|
6
|
-
|
|
7
6
|
/**
|
|
8
7
|
* Adds the specified event listener to receive {@link AdRewardInfo} when {@link RewardedAd}
|
|
9
8
|
* rewards the user.
|
|
10
|
-
*
|
|
9
|
+
*
|
|
11
10
|
* @param listener Listener to be notified.
|
|
12
11
|
*/
|
|
13
12
|
addAdReceivedRewardEventListener(listener: AdEventListener<AdRewardInfo>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AdContentRating, UserGender } from
|
|
1
|
+
import type { AdContentRating, UserGender } from '../TargetingData';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines additional data for the publisher to send to AppLovin.
|
|
@@ -6,7 +6,6 @@ import type { AdContentRating, UserGender } from "src/TargetingData";
|
|
|
6
6
|
* @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
|
|
7
7
|
*/
|
|
8
8
|
export type TargetingDataType = {
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* Sets the year of birth of the user. Set this to 0 to clear this value.
|
|
12
11
|
*/
|
package/src/types/ViewAd.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import type { AdEventListener } from
|
|
2
|
-
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from
|
|
3
|
-
import type {
|
|
1
|
+
import type { AdEventListener } from './AdEvent';
|
|
2
|
+
import type { AdInfo, AdLoadFailedInfo, AdRevenueInfo } from './AdInfo';
|
|
3
|
+
import type { LocalExtraParameterValue } from './AdProps';
|
|
4
|
+
import type { AdViewPosition } from '../AdView';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Define a view-based ad (i.e. Banner / MREC)
|
|
7
8
|
*/
|
|
8
9
|
export type ViewAdType = {
|
|
9
|
-
|
|
10
10
|
/**
|
|
11
11
|
* Destroys the banner/MREC.
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
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
|
* Shows the banner/MREC.
|
|
19
|
-
*
|
|
19
|
+
*
|
|
20
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
25
|
* Hides the banner/MREC.
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
27
|
* @param adUnitId The ad unit ID of the ad to hide.
|
|
28
28
|
*/
|
|
29
29
|
hideAd(adUnitId: string): void;
|
|
@@ -38,7 +38,7 @@ export type ViewAdType = {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Sets custom data to tie the showing ad’s events to.
|
|
41
|
-
*
|
|
41
|
+
*
|
|
42
42
|
* @param adUnitId The ad unit ID of the ad to set custom data for.
|
|
43
43
|
* @param customData The custom data to tie the showing ad's events to. Maximum size is 8KB.
|
|
44
44
|
*/
|
|
@@ -46,7 +46,7 @@ export type ViewAdType = {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Updates the banner/mrec position.
|
|
49
|
-
*
|
|
49
|
+
*
|
|
50
50
|
* @param adUnitId The ad unit ID of the ad to update the position of.
|
|
51
51
|
* @param bannerPosition {@link AdViewPosition} position.
|
|
52
52
|
*/
|
|
@@ -54,7 +54,7 @@ export type ViewAdType = {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Sets an extra key/value parameter for the ad.
|
|
57
|
-
*
|
|
57
|
+
*
|
|
58
58
|
* @param adUnitId The ad unit ID of the ad to set a parameter for.
|
|
59
59
|
* @param key Key parameter.
|
|
60
60
|
* @param value Value parameter.
|
|
@@ -63,30 +63,30 @@ export type ViewAdType = {
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Set a local extra parameter to pass to the adapter instances.
|
|
66
|
-
*
|
|
66
|
+
*
|
|
67
67
|
* @param adUnitId The ad unit ID of the ad to set a local parameter for.
|
|
68
68
|
* @param key Key parameter.
|
|
69
69
|
* @param value Value parameter.
|
|
70
70
|
*/
|
|
71
|
-
setLocalExtraParameter(adUnitId: string, key: string, value:
|
|
71
|
+
setLocalExtraParameter(adUnitId: string, key: string, value: LocalExtraParameterValue): void;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Starts or resumes auto-refreshing of the banner/mrec.
|
|
75
|
-
*
|
|
75
|
+
*
|
|
76
76
|
* @param adUnitId The ad unit ID of the ad to start or resume auto-refreshing.
|
|
77
77
|
*/
|
|
78
78
|
startAutoRefresh(adUnitId: string): void;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Pauses auto-refreshing of the banner/mrec.
|
|
82
|
-
*
|
|
82
|
+
*
|
|
83
83
|
* @param adUnitId The ad unit ID of the ad to stop auto-refreshing.
|
|
84
84
|
*/
|
|
85
85
|
stopAutoRefresh(adUnitId: string): void;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad loads a new ad.
|
|
89
|
-
*
|
|
89
|
+
*
|
|
90
90
|
* @param listener Listener to be notified.
|
|
91
91
|
*/
|
|
92
92
|
addAdLoadedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -99,7 +99,7 @@ export type ViewAdType = {
|
|
|
99
99
|
/**
|
|
100
100
|
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when a view-base ad
|
|
101
101
|
* could not load a new ad.
|
|
102
|
-
*
|
|
102
|
+
*
|
|
103
103
|
* @param listener Listener to be notified.
|
|
104
104
|
*/
|
|
105
105
|
addAdLoadFailedEventListener(listener: AdEventListener<AdLoadFailedInfo>): void;
|
|
@@ -112,7 +112,7 @@ export type ViewAdType = {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Adds the specified event listener to receive {@link AdInfo} when the user clicks the ad.
|
|
115
|
-
*
|
|
115
|
+
*
|
|
116
116
|
* @param listener Listener to be notified.
|
|
117
117
|
*/
|
|
118
118
|
addAdClickedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -124,7 +124,7 @@ export type ViewAdType = {
|
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad collapses the ad.
|
|
127
|
-
*
|
|
127
|
+
*
|
|
128
128
|
* @param listener Listener to be notified.
|
|
129
129
|
*/
|
|
130
130
|
addAdCollapsedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -136,7 +136,7 @@ export type ViewAdType = {
|
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
138
|
* Adds the specified event listener to receive {@link AdInfo} when a view-base ad expands the ad.
|
|
139
|
-
*
|
|
139
|
+
*
|
|
140
140
|
* @param listener Listener to be notified.
|
|
141
141
|
*/
|
|
142
142
|
addAdExpandedEventListener(listener: AdEventListener<AdInfo>): void;
|
|
@@ -149,7 +149,7 @@ export type ViewAdType = {
|
|
|
149
149
|
/**
|
|
150
150
|
* Adds the specified event listener to receive {@link AdRevenueInfo} when a view-base ad pays
|
|
151
151
|
* ad revenue to the publisher.
|
|
152
|
-
*
|
|
152
|
+
*
|
|
153
153
|
* @param listener Listener to be notified.
|
|
154
154
|
*/
|
|
155
155
|
addAdRevenuePaidListener(listener: AdEventListener<AdRevenueInfo>): void;
|
package/src/types/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './Configuration';
|
|
2
|
+
export * from './AdInfo';
|
|
3
|
+
export * from './AdViewProps';
|
|
4
|
+
export * from './NativeAdViewProps';
|