react-native-applovin-max 7.0.1 → 7.1.1
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/AppLovinMAXAdEvents.java +67 -0
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +10 -6
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManager.java +7 -7
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +9 -13
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModule.java +142 -626
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdView.java +6 -6
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +4 -4
- package/ios/AppLovinMAX.m +83 -478
- package/ios/AppLovinMAXAdView.h +12 -3
- package/ios/AppLovinMAXAdView.m +17 -13
- package/ios/AppLovinMAXAdViewManager.m +1 -1
- package/ios/AppLovinMAXAdViewUIComponent.h +7 -6
- package/ios/AppLovinMAXAdViewUIComponent.m +10 -15
- package/ios/AppLovinMAXNativeAdView.m +2 -2
- package/lib/commonjs/AppLovinMAX.js +19 -3
- package/lib/commonjs/AppLovinMAX.js.map +1 -1
- package/lib/commonjs/index.js +0 -22
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/AppLovinMAX.js +19 -3
- package/lib/module/AppLovinMAX.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/AppLovinMAX.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/AdProps.d.ts +6 -6
- package/lib/typescript/src/types/AppLovinMAX.d.ts +18 -6
- package/lib/typescript/src/types/AppLovinMAX.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-applovin-max.podspec +2 -2
- package/src/AppLovinMAX.ts +24 -3
- package/src/index.ts +0 -1
- package/src/types/AdProps.ts +6 -6
- package/src/types/AppLovinMAX.ts +20 -7
- package/lib/commonjs/TargetingData.js +0 -179
- package/lib/commonjs/TargetingData.js.map +0 -1
- package/lib/commonjs/types/TargetingData.js +0 -6
- package/lib/commonjs/types/TargetingData.js.map +0 -1
- package/lib/module/TargetingData.js +0 -175
- package/lib/module/TargetingData.js.map +0 -1
- package/lib/module/types/TargetingData.js +0 -2
- package/lib/module/types/TargetingData.js.map +0 -1
- package/lib/typescript/src/TargetingData.d.ts +0 -26
- package/lib/typescript/src/TargetingData.d.ts.map +0 -1
- package/lib/typescript/src/types/TargetingData.d.ts +0 -43
- package/lib/typescript/src/types/TargetingData.d.ts.map +0 -1
- package/src/TargetingData.ts +0 -212
- package/src/types/TargetingData.ts +0 -50
package/src/types/AdProps.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
};
|
package/src/types/AppLovinMAX.ts
CHANGED
|
@@ -86,13 +86,6 @@ export type AppLovinMAXType = {
|
|
|
86
86
|
*/
|
|
87
87
|
setExtraParameter(key: string, value: string | null): void;
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* Whether or not the AppLovinMAX SDK collects the device location.
|
|
91
|
-
*
|
|
92
|
-
* @param enabled Defaults to true.
|
|
93
|
-
*/
|
|
94
|
-
setLocationCollectionEnabled(enabled: boolean): void;
|
|
95
|
-
|
|
96
89
|
/**
|
|
97
90
|
* @deprecated Use {@link setTermsAndPrivacyPolicyFlowEnabled()} instead.
|
|
98
91
|
*
|
|
@@ -149,4 +142,24 @@ export type AppLovinMAXType = {
|
|
|
149
142
|
* @return {boolean}
|
|
150
143
|
*/
|
|
151
144
|
hasSupportedCmp(): Promise<boolean>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Adds a segment. Both the key and the values must be integers.
|
|
148
|
+
*
|
|
149
|
+
* @param key An integer key.
|
|
150
|
+
* @param values An array of integers.
|
|
151
|
+
* @returns A promise that resolves upon the successful addition. The resolved object contains
|
|
152
|
+
* void.
|
|
153
|
+
* @throws Throws an error if the segments can not be added.
|
|
154
|
+
*/
|
|
155
|
+
addSegment(key: number, values: number[]): Promise<void>;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Returns a list of segments.
|
|
159
|
+
*
|
|
160
|
+
* @returns A promise that resolves upon a successful inquiry. The resolved object contains a
|
|
161
|
+
* Map object that holds a list of segments, each represented by a key and an array of integers.
|
|
162
|
+
* @throws Throws an error if the segments can not be gotten.
|
|
163
|
+
*/
|
|
164
|
+
getSegments(): Promise<Map<number, number[]> | null>;
|
|
152
165
|
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UserGender = exports.TargetingData = exports.AdContentRating = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
const {
|
|
9
|
-
AppLovinMAX
|
|
10
|
-
} = _reactNative.NativeModules;
|
|
11
|
-
const nativeMethods = AppLovinMAX;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* This enumeration represents content ratings for the ads shown to users.
|
|
15
|
-
*/
|
|
16
|
-
let AdContentRating = exports.AdContentRating = /*#__PURE__*/function (AdContentRating) {
|
|
17
|
-
AdContentRating[AdContentRating["NONE"] = 0] = "NONE";
|
|
18
|
-
AdContentRating[AdContentRating["ALL_AUDIENCES"] = 1] = "ALL_AUDIENCES";
|
|
19
|
-
AdContentRating[AdContentRating["EVERYONE_OVER_TWELVE"] = 2] = "EVERYONE_OVER_TWELVE";
|
|
20
|
-
AdContentRating[AdContentRating["MATURE_AUDIENCES"] = 3] = "MATURE_AUDIENCES";
|
|
21
|
-
return AdContentRating;
|
|
22
|
-
}({});
|
|
23
|
-
/**
|
|
24
|
-
* This enumeration represents gender.
|
|
25
|
-
*/
|
|
26
|
-
let UserGender = exports.UserGender = /*#__PURE__*/function (UserGender) {
|
|
27
|
-
UserGender["UNKNOWN"] = "U";
|
|
28
|
-
UserGender["FEMALE"] = "F";
|
|
29
|
-
UserGender["MALE"] = "M";
|
|
30
|
-
UserGender["OTHER"] = "O";
|
|
31
|
-
return UserGender;
|
|
32
|
-
}({});
|
|
33
|
-
/**
|
|
34
|
-
* Defines additional data for the publisher to send to AppLovin.
|
|
35
|
-
*
|
|
36
|
-
* @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
|
|
37
|
-
*/
|
|
38
|
-
const TargetingData = exports.TargetingData = {
|
|
39
|
-
/**
|
|
40
|
-
* Sets the year of birth of the user. Set this to 0 to clear this value.
|
|
41
|
-
*/
|
|
42
|
-
set yearOfBirth(value) {
|
|
43
|
-
if (typeof value === 'number') {
|
|
44
|
-
nativeMethods.setTargetingDataYearOfBirth(value);
|
|
45
|
-
} else {
|
|
46
|
-
printError('TargetingData.yearOfBirth', 'number', typeof value);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* Gets the year of birth of the user.
|
|
51
|
-
*/
|
|
52
|
-
get yearOfBirth() {
|
|
53
|
-
return nativeMethods.getTargetingDataYearOfBirth();
|
|
54
|
-
},
|
|
55
|
-
/**
|
|
56
|
-
* Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
|
|
57
|
-
*/
|
|
58
|
-
set gender(value) {
|
|
59
|
-
if (value === UserGender.UNKNOWN || value === UserGender.FEMALE || value === UserGender.MALE || value === UserGender.OTHER) {
|
|
60
|
-
nativeMethods.setTargetingDataGender(value);
|
|
61
|
-
} else {
|
|
62
|
-
printError('TargetingData.gender', 'UserGender', typeof value);
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
/**
|
|
66
|
-
* Gets the gender of the user.
|
|
67
|
-
*/
|
|
68
|
-
get gender() {
|
|
69
|
-
return nativeMethods.getTargetingDataGender().then(value => {
|
|
70
|
-
return value;
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
/**
|
|
74
|
-
* Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
|
|
75
|
-
* Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
|
|
76
|
-
* Set this to {@link AdContentRating.None} to clear this value.
|
|
77
|
-
*/
|
|
78
|
-
set maximumAdContentRating(value) {
|
|
79
|
-
if (value === AdContentRating.NONE || value === AdContentRating.ALL_AUDIENCES || value === AdContentRating.EVERYONE_OVER_TWELVE || value === AdContentRating.MATURE_AUDIENCES) {
|
|
80
|
-
nativeMethods.setTargetingDataMaximumAdContentRating(value);
|
|
81
|
-
} else {
|
|
82
|
-
printError('TargetingData.maximumAdContentRating', 'AdContentRating', typeof value);
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
/**
|
|
86
|
-
* Gets the maximum ad content rating shown to the user. The levels are based on IQG Media
|
|
87
|
-
* Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
|
|
88
|
-
*/
|
|
89
|
-
get maximumAdContentRating() {
|
|
90
|
-
return nativeMethods.getTargetingDataMaximumAdContentRating().then(value => {
|
|
91
|
-
return value;
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
* Sets the email of the user. Set this to null to clear this value.
|
|
96
|
-
*/
|
|
97
|
-
set email(value) {
|
|
98
|
-
if (value === null) {
|
|
99
|
-
nativeMethods.setTargetingDataEmail(null);
|
|
100
|
-
} else if (typeof value === 'string') {
|
|
101
|
-
nativeMethods.setTargetingDataEmail(value);
|
|
102
|
-
} else {
|
|
103
|
-
printError('TargetingData.email', 'string or null', typeof value);
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
/**
|
|
107
|
-
* Gets the email of the user.
|
|
108
|
-
*/
|
|
109
|
-
get email() {
|
|
110
|
-
return nativeMethods.getTargetingDataEmail();
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
* Sets the phone number of the user. Set this to null to clear this value.
|
|
114
|
-
*/
|
|
115
|
-
set phoneNumber(value) {
|
|
116
|
-
if (value === null) {
|
|
117
|
-
nativeMethods.setTargetingDataPhoneNumber(null);
|
|
118
|
-
} else if (typeof value === 'string') {
|
|
119
|
-
nativeMethods.setTargetingDataPhoneNumber(value);
|
|
120
|
-
} else {
|
|
121
|
-
printError('TargetingData.phoneNumber', 'string or null', typeof value);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
/**
|
|
125
|
-
* Gets the phone number of the user.
|
|
126
|
-
*/
|
|
127
|
-
get phoneNumber() {
|
|
128
|
-
return nativeMethods.getTargetingDataPhoneNumber();
|
|
129
|
-
},
|
|
130
|
-
/**
|
|
131
|
-
* Sets the keywords describing the application. Set this to null to clear this value.
|
|
132
|
-
*/
|
|
133
|
-
set keywords(value) {
|
|
134
|
-
if (value === null) {
|
|
135
|
-
nativeMethods.setTargetingDataKeywords(null);
|
|
136
|
-
} else if (isStringArray(value)) {
|
|
137
|
-
nativeMethods.setTargetingDataKeywords(value);
|
|
138
|
-
} else {
|
|
139
|
-
printError('TargetingData.keywords', 'string[] or null', typeof value);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
/**
|
|
143
|
-
* Gets the keywords describing the application.
|
|
144
|
-
*/
|
|
145
|
-
get keywords() {
|
|
146
|
-
return nativeMethods.getTargetingDataKeywords();
|
|
147
|
-
},
|
|
148
|
-
/**
|
|
149
|
-
* Sets the interests of the user. Set this to null to clear this value.
|
|
150
|
-
*/
|
|
151
|
-
set interests(value) {
|
|
152
|
-
if (value === null) {
|
|
153
|
-
nativeMethods.setTargetingDataInterests(null);
|
|
154
|
-
} else if (isStringArray(value)) {
|
|
155
|
-
nativeMethods.setTargetingDataInterests(value);
|
|
156
|
-
} else {
|
|
157
|
-
printError('TargetingData.interests', 'string[] or null', typeof value);
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
/**
|
|
161
|
-
* Gets the interests of the user.
|
|
162
|
-
*/
|
|
163
|
-
get interests() {
|
|
164
|
-
return nativeMethods.getTargetingDataInterests();
|
|
165
|
-
},
|
|
166
|
-
/**
|
|
167
|
-
* Clears all saved data from this class.
|
|
168
|
-
*/
|
|
169
|
-
clearAll() {
|
|
170
|
-
nativeMethods.clearAllTargetingData();
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
const isStringArray = strs => {
|
|
174
|
-
return Array.isArray(strs) && strs.every(value => typeof value === 'string');
|
|
175
|
-
};
|
|
176
|
-
const printError = (fieldName, correctType, wrongType) => {
|
|
177
|
-
console.error('Cannot set value to ' + fieldName + ' with unsupported type: ' + wrongType + '. Value has to be of type ' + correctType + '.');
|
|
178
|
-
};
|
|
179
|
-
//# sourceMappingURL=TargetingData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","AppLovinMAX","NativeModules","nativeMethods","AdContentRating","exports","UserGender","TargetingData","yearOfBirth","value","setTargetingDataYearOfBirth","printError","getTargetingDataYearOfBirth","gender","UNKNOWN","FEMALE","MALE","OTHER","setTargetingDataGender","getTargetingDataGender","then","maximumAdContentRating","NONE","ALL_AUDIENCES","EVERYONE_OVER_TWELVE","MATURE_AUDIENCES","setTargetingDataMaximumAdContentRating","getTargetingDataMaximumAdContentRating","email","setTargetingDataEmail","getTargetingDataEmail","phoneNumber","setTargetingDataPhoneNumber","getTargetingDataPhoneNumber","keywords","setTargetingDataKeywords","isStringArray","getTargetingDataKeywords","interests","setTargetingDataInterests","getTargetingDataInterests","clearAll","clearAllTargetingData","strs","Array","isArray","every","fieldName","correctType","wrongType","console","error"],"sourceRoot":"../../src","sources":["TargetingData.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,MAAM;EAAEC;AAAY,CAAC,GAAGC,0BAAa;AAoBrC,MAAMC,aAAsC,GAAGF,WAAW;;AAE1D;AACA;AACA;AAFA,IAGYG,eAAe,GAAAC,OAAA,CAAAD,eAAA,0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AAC;EACpD,CAAC;EAED;AACJ;AACA;EACIC,QAAQA,CAAA,EAAS;IACbtC,aAAa,CAACuC,qBAAqB,CAAC,CAAC;EACzC;AACJ,CAAC;AAED,MAAMN,aAAa,GAAIO,IAAY,IAAc;EAC7C,OAAOC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,IAAIA,IAAI,CAACG,KAAK,CAAErC,KAAK,IAAK,OAAOA,KAAK,KAAK,QAAQ,CAAC;AAClF,CAAC;AAED,MAAME,UAAU,GAAGA,CAACoC,SAAiB,EAAEC,WAAmB,EAAEC,SAAiB,KAAK;EAC9EC,OAAO,CAACC,KAAK,CAAC,sBAAsB,GAAGJ,SAAS,GAAG,0BAA0B,GAAGE,SAAS,GAAG,6BAA6B,GAAGD,WAAW,GAAG,GAAG,CAAC;AAClJ,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/TargetingData.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
2
|
-
const {
|
|
3
|
-
AppLovinMAX
|
|
4
|
-
} = NativeModules;
|
|
5
|
-
const nativeMethods = AppLovinMAX;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* This enumeration represents content ratings for the ads shown to users.
|
|
9
|
-
*/
|
|
10
|
-
export let AdContentRating = /*#__PURE__*/function (AdContentRating) {
|
|
11
|
-
AdContentRating[AdContentRating["NONE"] = 0] = "NONE";
|
|
12
|
-
AdContentRating[AdContentRating["ALL_AUDIENCES"] = 1] = "ALL_AUDIENCES";
|
|
13
|
-
AdContentRating[AdContentRating["EVERYONE_OVER_TWELVE"] = 2] = "EVERYONE_OVER_TWELVE";
|
|
14
|
-
AdContentRating[AdContentRating["MATURE_AUDIENCES"] = 3] = "MATURE_AUDIENCES";
|
|
15
|
-
return AdContentRating;
|
|
16
|
-
}({});
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* This enumeration represents gender.
|
|
20
|
-
*/
|
|
21
|
-
export let UserGender = /*#__PURE__*/function (UserGender) {
|
|
22
|
-
UserGender["UNKNOWN"] = "U";
|
|
23
|
-
UserGender["FEMALE"] = "F";
|
|
24
|
-
UserGender["MALE"] = "M";
|
|
25
|
-
UserGender["OTHER"] = "O";
|
|
26
|
-
return UserGender;
|
|
27
|
-
}({});
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Defines additional data for the publisher to send to AppLovin.
|
|
31
|
-
*
|
|
32
|
-
* @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
|
|
33
|
-
*/
|
|
34
|
-
export const TargetingData = {
|
|
35
|
-
/**
|
|
36
|
-
* Sets the year of birth of the user. Set this to 0 to clear this value.
|
|
37
|
-
*/
|
|
38
|
-
set yearOfBirth(value) {
|
|
39
|
-
if (typeof value === 'number') {
|
|
40
|
-
nativeMethods.setTargetingDataYearOfBirth(value);
|
|
41
|
-
} else {
|
|
42
|
-
printError('TargetingData.yearOfBirth', 'number', typeof value);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
/**
|
|
46
|
-
* Gets the year of birth of the user.
|
|
47
|
-
*/
|
|
48
|
-
get yearOfBirth() {
|
|
49
|
-
return nativeMethods.getTargetingDataYearOfBirth();
|
|
50
|
-
},
|
|
51
|
-
/**
|
|
52
|
-
* Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
|
|
53
|
-
*/
|
|
54
|
-
set gender(value) {
|
|
55
|
-
if (value === UserGender.UNKNOWN || value === UserGender.FEMALE || value === UserGender.MALE || value === UserGender.OTHER) {
|
|
56
|
-
nativeMethods.setTargetingDataGender(value);
|
|
57
|
-
} else {
|
|
58
|
-
printError('TargetingData.gender', 'UserGender', typeof value);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
/**
|
|
62
|
-
* Gets the gender of the user.
|
|
63
|
-
*/
|
|
64
|
-
get gender() {
|
|
65
|
-
return nativeMethods.getTargetingDataGender().then(value => {
|
|
66
|
-
return value;
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
/**
|
|
70
|
-
* Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
|
|
71
|
-
* Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
|
|
72
|
-
* Set this to {@link AdContentRating.None} to clear this value.
|
|
73
|
-
*/
|
|
74
|
-
set maximumAdContentRating(value) {
|
|
75
|
-
if (value === AdContentRating.NONE || value === AdContentRating.ALL_AUDIENCES || value === AdContentRating.EVERYONE_OVER_TWELVE || value === AdContentRating.MATURE_AUDIENCES) {
|
|
76
|
-
nativeMethods.setTargetingDataMaximumAdContentRating(value);
|
|
77
|
-
} else {
|
|
78
|
-
printError('TargetingData.maximumAdContentRating', 'AdContentRating', typeof value);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* Gets the maximum ad content rating shown to the user. The levels are based on IQG Media
|
|
83
|
-
* Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
|
|
84
|
-
*/
|
|
85
|
-
get maximumAdContentRating() {
|
|
86
|
-
return nativeMethods.getTargetingDataMaximumAdContentRating().then(value => {
|
|
87
|
-
return value;
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Sets the email of the user. Set this to null to clear this value.
|
|
92
|
-
*/
|
|
93
|
-
set email(value) {
|
|
94
|
-
if (value === null) {
|
|
95
|
-
nativeMethods.setTargetingDataEmail(null);
|
|
96
|
-
} else if (typeof value === 'string') {
|
|
97
|
-
nativeMethods.setTargetingDataEmail(value);
|
|
98
|
-
} else {
|
|
99
|
-
printError('TargetingData.email', 'string or null', typeof value);
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
/**
|
|
103
|
-
* Gets the email of the user.
|
|
104
|
-
*/
|
|
105
|
-
get email() {
|
|
106
|
-
return nativeMethods.getTargetingDataEmail();
|
|
107
|
-
},
|
|
108
|
-
/**
|
|
109
|
-
* Sets the phone number of the user. Set this to null to clear this value.
|
|
110
|
-
*/
|
|
111
|
-
set phoneNumber(value) {
|
|
112
|
-
if (value === null) {
|
|
113
|
-
nativeMethods.setTargetingDataPhoneNumber(null);
|
|
114
|
-
} else if (typeof value === 'string') {
|
|
115
|
-
nativeMethods.setTargetingDataPhoneNumber(value);
|
|
116
|
-
} else {
|
|
117
|
-
printError('TargetingData.phoneNumber', 'string or null', typeof value);
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* Gets the phone number of the user.
|
|
122
|
-
*/
|
|
123
|
-
get phoneNumber() {
|
|
124
|
-
return nativeMethods.getTargetingDataPhoneNumber();
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* Sets the keywords describing the application. Set this to null to clear this value.
|
|
128
|
-
*/
|
|
129
|
-
set keywords(value) {
|
|
130
|
-
if (value === null) {
|
|
131
|
-
nativeMethods.setTargetingDataKeywords(null);
|
|
132
|
-
} else if (isStringArray(value)) {
|
|
133
|
-
nativeMethods.setTargetingDataKeywords(value);
|
|
134
|
-
} else {
|
|
135
|
-
printError('TargetingData.keywords', 'string[] or null', typeof value);
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
/**
|
|
139
|
-
* Gets the keywords describing the application.
|
|
140
|
-
*/
|
|
141
|
-
get keywords() {
|
|
142
|
-
return nativeMethods.getTargetingDataKeywords();
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* Sets the interests of the user. Set this to null to clear this value.
|
|
146
|
-
*/
|
|
147
|
-
set interests(value) {
|
|
148
|
-
if (value === null) {
|
|
149
|
-
nativeMethods.setTargetingDataInterests(null);
|
|
150
|
-
} else if (isStringArray(value)) {
|
|
151
|
-
nativeMethods.setTargetingDataInterests(value);
|
|
152
|
-
} else {
|
|
153
|
-
printError('TargetingData.interests', 'string[] or null', typeof value);
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
/**
|
|
157
|
-
* Gets the interests of the user.
|
|
158
|
-
*/
|
|
159
|
-
get interests() {
|
|
160
|
-
return nativeMethods.getTargetingDataInterests();
|
|
161
|
-
},
|
|
162
|
-
/**
|
|
163
|
-
* Clears all saved data from this class.
|
|
164
|
-
*/
|
|
165
|
-
clearAll() {
|
|
166
|
-
nativeMethods.clearAllTargetingData();
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
const isStringArray = strs => {
|
|
170
|
-
return Array.isArray(strs) && strs.every(value => typeof value === 'string');
|
|
171
|
-
};
|
|
172
|
-
const printError = (fieldName, correctType, wrongType) => {
|
|
173
|
-
console.error('Cannot set value to ' + fieldName + ' with unsupported type: ' + wrongType + '. Value has to be of type ' + correctType + '.');
|
|
174
|
-
};
|
|
175
|
-
//# sourceMappingURL=TargetingData.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","AppLovinMAX","nativeMethods","AdContentRating","UserGender","TargetingData","yearOfBirth","value","setTargetingDataYearOfBirth","printError","getTargetingDataYearOfBirth","gender","UNKNOWN","FEMALE","MALE","OTHER","setTargetingDataGender","getTargetingDataGender","then","maximumAdContentRating","NONE","ALL_AUDIENCES","EVERYONE_OVER_TWELVE","MATURE_AUDIENCES","setTargetingDataMaximumAdContentRating","getTargetingDataMaximumAdContentRating","email","setTargetingDataEmail","getTargetingDataEmail","phoneNumber","setTargetingDataPhoneNumber","getTargetingDataPhoneNumber","keywords","setTargetingDataKeywords","isStringArray","getTargetingDataKeywords","interests","setTargetingDataInterests","getTargetingDataInterests","clearAll","clearAllTargetingData","strs","Array","isArray","every","fieldName","correctType","wrongType","console","error"],"sourceRoot":"../../src","sources":["TargetingData.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAG5C,MAAM;EAAEC;AAAY,CAAC,GAAGD,aAAa;AAoBrC,MAAME,aAAsC,GAAGD,WAAW;;AAE1D;AACA;AACA;AACA,WA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ACA;EACIC,QAAQA,CAAA,EAAS;IACbrC,aAAa,CAACsC,qBAAqB,CAAC,CAAC;EACzC;AACJ,CAAC;AAED,MAAMN,aAAa,GAAIO,IAAY,IAAc;EAC7C,OAAOC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,IAAIA,IAAI,CAACG,KAAK,CAAErC,KAAK,IAAK,OAAOA,KAAK,KAAK,QAAQ,CAAC;AAClF,CAAC;AAED,MAAME,UAAU,GAAGA,CAACoC,SAAiB,EAAEC,WAAmB,EAAEC,SAAiB,KAAK;EAC9EC,OAAO,CAACC,KAAK,CAAC,sBAAsB,GAAGJ,SAAS,GAAG,0BAA0B,GAAGE,SAAS,GAAG,6BAA6B,GAAGD,WAAW,GAAG,GAAG,CAAC;AAClJ,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/TargetingData.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { TargetingDataType } from './types/TargetingData';
|
|
2
|
-
/**
|
|
3
|
-
* This enumeration represents content ratings for the ads shown to users.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum AdContentRating {
|
|
6
|
-
NONE = 0,
|
|
7
|
-
ALL_AUDIENCES = 1,
|
|
8
|
-
EVERYONE_OVER_TWELVE = 2,
|
|
9
|
-
MATURE_AUDIENCES = 3
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This enumeration represents gender.
|
|
13
|
-
*/
|
|
14
|
-
export declare enum UserGender {
|
|
15
|
-
UNKNOWN = "U",
|
|
16
|
-
FEMALE = "F",
|
|
17
|
-
MALE = "M",
|
|
18
|
-
OTHER = "O"
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Defines additional data for the publisher to send to AppLovin.
|
|
22
|
-
*
|
|
23
|
-
* @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
|
|
24
|
-
*/
|
|
25
|
-
export declare const TargetingData: TargetingDataType;
|
|
26
|
-
//# sourceMappingURL=TargetingData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TargetingData.d.ts","sourceRoot":"","sources":["../../../src/TargetingData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAwB/D;;GAEG;AACH,oBAAY,eAAe;IACvB,IAAI,IAAI;IACR,aAAa,IAAI;IACjB,oBAAoB,IAAI;IACxB,gBAAgB,IAAI;CACvB;AAED;;GAEG;AACH,oBAAY,UAAU;IAClB,OAAO,MAAM;IACb,MAAM,MAAM;IACZ,IAAI,MAAM;IACV,KAAK,MAAM;CACd;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,iBAyJ3B,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { AdContentRating, UserGender } from '../TargetingData';
|
|
2
|
-
/**
|
|
3
|
-
* Defines additional data for the publisher to send to AppLovin.
|
|
4
|
-
*
|
|
5
|
-
* @see {@link https://support.applovin.com/hc/en-us/articles/13964925614733-Data-and-Keyword-Passing}
|
|
6
|
-
*/
|
|
7
|
-
export type TargetingDataType = {
|
|
8
|
-
/**
|
|
9
|
-
* Sets the year of birth of the user. Set this to 0 to clear this value.
|
|
10
|
-
*/
|
|
11
|
-
yearOfBirth: number | Promise<number>;
|
|
12
|
-
/**
|
|
13
|
-
* Sets the gender of the user. Set this to {@link UserGender.Unknown} to clear this value.
|
|
14
|
-
*/
|
|
15
|
-
gender: UserGender | Promise<UserGender>;
|
|
16
|
-
/**
|
|
17
|
-
* Sets the maximum ad content rating shown to the user. The levels are based on IQG Media
|
|
18
|
-
* Ratings: 1=All Audiences, 2=Everyone Over 12, 3=Mature Audiences.
|
|
19
|
-
* Set this to {@link AdContentRating.None} to clear this value.
|
|
20
|
-
*/
|
|
21
|
-
maximumAdContentRating: AdContentRating | Promise<AdContentRating>;
|
|
22
|
-
/**
|
|
23
|
-
* Sets the email of the user. Set this to null to clear this value.
|
|
24
|
-
*/
|
|
25
|
-
email: string | null | Promise<string | null>;
|
|
26
|
-
/**
|
|
27
|
-
* Sets the phone number of the user. Set this to null to clear this value.
|
|
28
|
-
*/
|
|
29
|
-
phoneNumber: string | null | Promise<string | null>;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the keywords describing the application. Set this to null to clear this value.
|
|
32
|
-
*/
|
|
33
|
-
keywords: string[] | null | Promise<string[] | null>;
|
|
34
|
-
/**
|
|
35
|
-
* Sets the interests of the user. Set this to null to clear this value.
|
|
36
|
-
*/
|
|
37
|
-
interests: string[] | null | Promise<string[] | null>;
|
|
38
|
-
/**
|
|
39
|
-
* Clears all saved data from this class.
|
|
40
|
-
*/
|
|
41
|
-
clearAll(): void;
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=TargetingData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TargetingData.d.ts","sourceRoot":"","sources":["../../../../src/types/TargetingData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzC;;;;OAIG;IACH,sBAAsB,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEnE;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE9C;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEpD;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAErD;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAEtD;;OAEG;IACH,QAAQ,IAAI,IAAI,CAAC;CACpB,CAAC"}
|