react-native-applovin-max 8.2.0 → 9.1.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 +14 -3
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +34 -27
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManagerImpl.java +110 -0
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +15 -13
- package/android/src/main/java/com/applovin/reactnative/{AppLovinMAXModule.java → AppLovinMAXModuleImpl.java} +108 -168
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdView.java +84 -56
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdViewManagerImpl.java +101 -0
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXPackage.java +44 -11
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXUtils.java +56 -0
- package/android/src/newarch/com/applovin/reactnative/AppLovinMAXAdViewManager.java +151 -0
- package/android/src/newarch/com/applovin/reactnative/AppLovinMAXModule.java +453 -0
- package/android/src/newarch/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +130 -0
- package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXAdViewManager.java +128 -0
- package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXModule.java +453 -0
- package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +93 -0
- package/ios/AppLovinMAX.h +8 -3
- package/ios/{AppLovinMAX.m → AppLovinMAX.mm} +67 -53
- package/ios/AppLovinMAXAdView.h +7 -2
- package/ios/AppLovinMAXAdView.mm +747 -0
- package/ios/{AppLovinMAXAdViewManager.m → AppLovinMAXAdViewManager.mm} +3 -2
- package/ios/{AppLovinMAXAdViewUIComponent.m → AppLovinMAXAdViewUIComponent.mm} +2 -1
- package/ios/AppLovinMAXNativeAdView.h +15 -4
- package/ios/AppLovinMAXNativeAdView.mm +745 -0
- package/ios/AppLovinMAXNativeAdViewManager.mm +116 -0
- package/lib/commonjs/AdView.js +102 -142
- package/lib/commonjs/AdView.js.map +1 -1
- package/lib/commonjs/AppLovinMAX.js +49 -34
- package/lib/commonjs/AppLovinMAX.js.map +1 -1
- package/lib/commonjs/AppOpenAd.js +8 -10
- package/lib/commonjs/AppOpenAd.js.map +1 -1
- package/lib/commonjs/BannerAd.js +19 -21
- package/lib/commonjs/BannerAd.js.map +1 -1
- package/lib/commonjs/ErrorCode.js +27 -36
- package/lib/commonjs/ErrorCode.js.map +1 -1
- package/lib/commonjs/EventEmitter.js +24 -5
- package/lib/commonjs/EventEmitter.js.map +1 -1
- package/lib/commonjs/InterstitialAd.js +8 -10
- package/lib/commonjs/InterstitialAd.js.map +1 -1
- package/lib/commonjs/MRecAd.js +14 -16
- package/lib/commonjs/MRecAd.js.map +1 -1
- package/lib/commonjs/Privacy.js +3 -5
- package/lib/commonjs/Privacy.js.map +1 -1
- package/lib/commonjs/RewardedAd.js +8 -10
- package/lib/commonjs/RewardedAd.js.map +1 -1
- package/lib/commonjs/Utils.js +43 -0
- package/lib/commonjs/Utils.js.map +1 -0
- package/lib/commonjs/nativeAd/NativeAdView.js +84 -50
- package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js +129 -82
- package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js +67 -8
- package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/commonjs/nativeAd/img/blank_icon.png +0 -0
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js +41 -0
- package/lib/commonjs/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js +37 -0
- package/lib/commonjs/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js +16 -0
- package/lib/commonjs/specs/NativeAppLovinMAXModule.js.map +1 -0
- package/lib/commonjs/types/AdInfo.js +13 -16
- package/lib/commonjs/types/AdInfo.js.map +1 -1
- package/lib/module/AdView.js +98 -139
- package/lib/module/AdView.js.map +1 -1
- package/lib/module/AppLovinMAX.js +47 -32
- package/lib/module/AppLovinMAX.js.map +1 -1
- package/lib/module/AppOpenAd.js +1 -4
- package/lib/module/AppOpenAd.js.map +1 -1
- package/lib/module/BannerAd.js +1 -4
- package/lib/module/BannerAd.js.map +1 -1
- package/lib/module/ErrorCode.js +25 -35
- package/lib/module/ErrorCode.js.map +1 -1
- package/lib/module/EventEmitter.js +24 -5
- package/lib/module/EventEmitter.js.map +1 -1
- package/lib/module/InterstitialAd.js +2 -5
- package/lib/module/InterstitialAd.js.map +1 -1
- package/lib/module/MRecAd.js +1 -4
- package/lib/module/MRecAd.js.map +1 -1
- package/lib/module/Privacy.js +1 -4
- package/lib/module/Privacy.js.map +1 -1
- package/lib/module/RewardedAd.js +2 -5
- package/lib/module/RewardedAd.js.map +1 -1
- package/lib/module/Utils.js +35 -0
- package/lib/module/Utils.js.map +1 -0
- package/lib/module/nativeAd/NativeAdView.js +83 -47
- package/lib/module/nativeAd/NativeAdView.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewComponents.js +134 -83
- package/lib/module/nativeAd/NativeAdViewComponents.js.map +1 -1
- package/lib/module/nativeAd/NativeAdViewProvider.js +69 -9
- package/lib/module/nativeAd/NativeAdViewProvider.js.map +1 -1
- package/lib/module/nativeAd/img/blank_icon.png +0 -0
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js +35 -0
- package/lib/module/specs/AppLovinMAXAdViewNativeComponent.js.map +1 -0
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js +31 -0
- package/lib/module/specs/AppLovinMAXNativeAdViewNativeComponent.js.map +1 -0
- package/lib/module/specs/NativeAppLovinMAXModule.js +12 -0
- package/lib/module/specs/NativeAppLovinMAXModule.js.map +1 -0
- package/lib/module/types/AdInfo.js +13 -16
- package/lib/module/types/AdInfo.js.map +1 -1
- package/lib/typescript/src/AdView.d.ts +38 -32
- 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/AppOpenAd.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/InterstitialAd.d.ts.map +1 -1
- package/lib/typescript/src/MRecAd.d.ts.map +1 -1
- package/lib/typescript/src/Privacy.d.ts.map +1 -1
- package/lib/typescript/src/RewardedAd.d.ts.map +1 -1
- package/lib/typescript/src/Utils.d.ts +31 -0
- package/lib/typescript/src/Utils.d.ts.map +1 -0
- 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 +31 -5
- package/lib/typescript/src/nativeAd/NativeAdViewProvider.d.ts.map +1 -1
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts +130 -0
- package/lib/typescript/src/specs/AppLovinMAXAdViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts +131 -0
- package/lib/typescript/src/specs/AppLovinMAXNativeAdViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts +142 -0
- package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts.map +1 -0
- 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 +79 -86
- package/lib/typescript/src/types/AdInfo.d.ts.map +1 -1
- package/lib/typescript/src/types/AdProps.d.ts +16 -17
- package/lib/typescript/src/types/AdProps.d.ts.map +1 -1
- package/lib/typescript/src/types/AdViewProps.d.ts +28 -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 +22 -17
- 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 +15 -10
- 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 +9 -1
- package/react-native-applovin-max.podspec +3 -3
- package/src/AdView.tsx +100 -183
- package/src/AppLovinMAX.ts +42 -33
- package/src/AppOpenAd.ts +1 -3
- package/src/BannerAd.ts +1 -3
- package/src/ErrorCode.ts +25 -34
- package/src/EventEmitter.ts +22 -5
- package/src/InterstitialAd.ts +2 -4
- package/src/MRecAd.ts +1 -3
- package/src/Privacy.ts +1 -3
- package/src/RewardedAd.ts +2 -4
- package/src/Utils.ts +45 -0
- package/src/nativeAd/NativeAdView.tsx +83 -73
- package/src/nativeAd/NativeAdViewComponents.tsx +120 -89
- package/src/nativeAd/NativeAdViewProvider.tsx +60 -12
- package/src/nativeAd/img/blank_icon.png +0 -0
- package/src/specs/AppLovinMAXAdViewNativeComponent.ts +157 -0
- package/src/specs/AppLovinMAXNativeAdViewNativeComponent.ts +153 -0
- package/src/specs/NativeAppLovinMAXModule.ts +228 -0
- package/src/types/AdEvent.ts +10 -4
- package/src/types/AdInfo.ts +79 -86
- package/src/types/AdProps.ts +16 -17
- package/src/types/AdViewProps.ts +28 -29
- package/src/types/AppLovinMAX.ts +50 -53
- package/src/types/BannerAd.ts +22 -17
- 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 +16 -10
- 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/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewManager.java +0 -149
- package/android/src/main/java/com/applovin/reactnative/AppLovinMAXNativeAdViewManager.java +0 -163
- package/ios/AppLovinMAXAdView.m +0 -325
- package/ios/AppLovinMAXNativeAdView.m +0 -432
- package/ios/AppLovinMAXNativeAdViewManager.m +0 -64
|
@@ -3,59 +3,68 @@ import type { ViewProps } from 'react-native';
|
|
|
3
3
|
import type { AdInfo, AdLoadFailedInfo } from './types/AdInfo';
|
|
4
4
|
import type { AdViewHandler, NativeUIComponentAdViewOptions, AdViewId } from './types/AdViewProps';
|
|
5
5
|
/**
|
|
6
|
-
* Defines
|
|
6
|
+
* Defines the format of an ad.
|
|
7
7
|
*/
|
|
8
8
|
export declare enum AdFormat {
|
|
9
9
|
/**
|
|
10
10
|
* Banner ad.
|
|
11
11
|
*/
|
|
12
|
-
BANNER,
|
|
12
|
+
BANNER = "BANNER",
|
|
13
13
|
/**
|
|
14
14
|
* MREC ad.
|
|
15
15
|
*/
|
|
16
|
-
MREC
|
|
16
|
+
MREC = "MREC"
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Defines
|
|
19
|
+
* Defines the position for rendering a banner or MREC ad within its container.
|
|
20
20
|
*/
|
|
21
21
|
export declare enum AdViewPosition {
|
|
22
|
-
TOP_CENTER,
|
|
23
|
-
TOP_LEFT,
|
|
24
|
-
TOP_RIGHT,
|
|
25
|
-
CENTERED,
|
|
26
|
-
CENTER_LEFT,
|
|
27
|
-
CENTER_RIGHT,
|
|
28
|
-
BOTTOM_LEFT,
|
|
29
|
-
BOTTOM_CENTER,
|
|
30
|
-
BOTTOM_RIGHT
|
|
22
|
+
TOP_CENTER = "top_center",
|
|
23
|
+
TOP_LEFT = "top_left",
|
|
24
|
+
TOP_RIGHT = "top_right",
|
|
25
|
+
CENTERED = "centered",
|
|
26
|
+
CENTER_LEFT = "center_left",
|
|
27
|
+
CENTER_RIGHT = "center_right",
|
|
28
|
+
BOTTOM_LEFT = "bottom_left",
|
|
29
|
+
BOTTOM_CENTER = "bottom_center",
|
|
30
|
+
BOTTOM_RIGHT = "bottom_right"
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* - **Banners**: 320x50 on phones, 728x90 on tablets.
|
|
35
|
-
* - **MRECs**: 300x250 on all devices.
|
|
33
|
+
* Renders a banner or MREC ad using a native view, with adaptive or responsive sizing.
|
|
36
34
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* - **Banners**: 320×50 on phones, 728×90 on tablets.
|
|
36
|
+
* - **MRECs**: Fixed size of 300×250 on all devices.
|
|
37
|
+
*
|
|
38
|
+
* Internally uses {@link AppLovinMAX.isTablet()} to determine banner size on tablets.
|
|
39
|
+
* You can also use this method externally to assist with layout decisions.
|
|
40
|
+
*
|
|
41
|
+
* For adaptive banners, use {@link BannerAd.getAdaptiveHeightForWidth()} to determine the appropriate height.
|
|
39
42
|
*
|
|
40
43
|
* **Preloading**:
|
|
41
|
-
*
|
|
42
|
-
* the returned {@link AdViewId}
|
|
44
|
+
* If you preload an ad for AdView using {@link preloadNativeUIComponentAdView},
|
|
45
|
+
* pass the returned {@link AdViewId} to this component to display the preloaded instance.
|
|
46
|
+
*
|
|
47
|
+
* **Note:** The AppLovin SDK must be initialized before using this component.
|
|
43
48
|
*
|
|
44
49
|
* ### Example:
|
|
45
|
-
* ```
|
|
50
|
+
* ```tsx
|
|
46
51
|
* <AdView
|
|
47
52
|
* adUnitId={adUnitId}
|
|
48
53
|
* adFormat={AdFormat.BANNER}
|
|
49
54
|
* placement="my_placement"
|
|
50
55
|
* customData="my_customData"
|
|
51
|
-
* extraParameters={{
|
|
52
|
-
* localExtraParameters={{
|
|
56
|
+
* extraParameters={{ key1: "value1", key2: "value2" }}
|
|
57
|
+
* localExtraParameters={{ key1: "value1", key2: true }}
|
|
53
58
|
* adaptiveBannerEnabled={false}
|
|
54
59
|
* autoRefresh={false}
|
|
55
60
|
* style={styles.banner}
|
|
56
61
|
* onAdLoaded={(adInfo: AdInfo) => { ... }}
|
|
57
62
|
* />
|
|
58
63
|
* ```
|
|
64
|
+
*
|
|
65
|
+
* For complete implementation examples, see:
|
|
66
|
+
* - https://github.com/AppLovin/AppLovin-MAX-React-Native/blob/master/example/src/NativeBannerExample.tsx
|
|
67
|
+
* - https://github.com/AppLovin/AppLovin-MAX-React-Native/blob/master/example/src/NativeMRecExample.tsx
|
|
59
68
|
*/
|
|
60
69
|
export declare const AdView: React.ForwardRefExoticComponent<import("./types/AdProps").AdProps & {
|
|
61
70
|
adFormat: AdFormat;
|
|
@@ -73,10 +82,10 @@ export declare const AdView: React.ForwardRefExoticComponent<import("./types/AdP
|
|
|
73
82
|
* - Unmounting {@link AdView} does not destroy the preloaded component—it will be reused on the next mount.
|
|
74
83
|
* - You must manually destroy the preloaded component when it is no longer needed using {@link destroyNativeUIComponentAdView}.
|
|
75
84
|
*
|
|
76
|
-
* @param adUnitId - The Ad Unit ID for which
|
|
85
|
+
* @param adUnitId - The Ad Unit ID for which ads should be preloaded.
|
|
77
86
|
* @param adFormat - The ad format to preload. Must be either {@link AdFormat.BANNER} or {@link AdFormat.MREC}.
|
|
78
87
|
* @param options - Optional properties to configure the native UI component (e.g., placement, custom data).
|
|
79
|
-
* @returns A promise
|
|
88
|
+
* @returns A promise that resolves to an {@link AdViewId}, uniquely identifying the preloaded component instance.
|
|
80
89
|
* @throws An error if the preload request fails.
|
|
81
90
|
*/
|
|
82
91
|
export declare const preloadNativeUIComponentAdView: (adUnitId: string, adFormat: AdFormat, options?: NativeUIComponentAdViewOptions) => Promise<AdViewId>;
|
|
@@ -91,26 +100,23 @@ export declare const preloadNativeUIComponentAdView: (adUnitId: string, adFormat
|
|
|
91
100
|
*/
|
|
92
101
|
export declare const destroyNativeUIComponentAdView: (adViewId: AdViewId) => Promise<void>;
|
|
93
102
|
/**
|
|
94
|
-
* Adds the specified event listener to receive {@link AdInfo} when a native UI component loads a
|
|
95
|
-
* new ad.
|
|
103
|
+
* Adds the specified event listener to receive {@link AdInfo} when a native UI component loads a new ad.
|
|
96
104
|
*
|
|
97
105
|
* @param listener Listener to be notified.
|
|
98
106
|
*/
|
|
99
107
|
export declare const addNativeUIComponentAdViewAdLoadedEventListener: (listener: (adInfo: AdInfo) => void) => void;
|
|
100
108
|
/**
|
|
101
|
-
* Removes the event listener to receive {@link AdInfo} when a native UI component loads a new ad.
|
|
109
|
+
* Removes the event listener registered to receive {@link AdInfo} when a native UI component loads a new ad.
|
|
102
110
|
*/
|
|
103
111
|
export declare const removeNativeUIComponentAdViewAdLoadedEventListener: () => void;
|
|
104
112
|
/**
|
|
105
|
-
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when a native UI component
|
|
106
|
-
* could not load a new ad.
|
|
113
|
+
* Adds the specified event listener to receive {@link AdLoadFailedInfo} when a native UI component could not load a new ad.
|
|
107
114
|
*
|
|
108
115
|
* @param listener Listener to be notified.
|
|
109
116
|
*/
|
|
110
117
|
export declare const addNativeUIComponentAdViewAdLoadFailedEventListener: (listener: (errorInfo: AdLoadFailedInfo) => void) => void;
|
|
111
118
|
/**
|
|
112
|
-
* Removes the event listener to receive {@link AdLoadFailedInfo} when a native UI component could
|
|
113
|
-
* not load a new ad.
|
|
119
|
+
* Removes the event listener registered to receive {@link AdLoadFailedInfo} when a native UI component could not load a new ad.
|
|
114
120
|
*/
|
|
115
121
|
export declare const removeNativeUIComponentAdViewAdLoadFailedEventListener: () => void;
|
|
116
122
|
//# sourceMappingURL=AdView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdView.d.ts","sourceRoot":"","sources":["../../../src/AdView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"AdView.d.ts","sourceRoot":"","sources":["../../../src/AdView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAwB,SAAS,EAAwC,MAAM,cAAc,CAAC;AAK1G,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAe,aAAa,EAAE,8BAA8B,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKhH;;GAEG;AACH,oBAAY,QAAQ;IAChB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,oBAAY,cAAc;IACtB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAChC;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,MAAM;;;;;;;;mDA4HjB,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,8BAA8B,GAAU,UAAU,MAAM,EAAE,UAAU,QAAQ,EAAE,UAAS,8BAAmC,KAAG,OAAO,CAAC,QAAQ,CAGzJ,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,GAAU,UAAU,QAAQ,KAAG,OAAO,CAAC,IAAI,CAKrF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+CAA+C,GAAI,UAAU,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAAG,IAEpG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kDAAkD,QAAO,IAErE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mDAAmD,GAAI,UAAU,CAAC,SAAS,EAAE,gBAAgB,KAAK,IAAI,KAAG,IAErH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sDAAsD,QAAO,IAEzE,CAAC"}
|
|
@@ -1,73 +1,74 @@
|
|
|
1
1
|
import type { AppLovinMAXType } from './types/AppLovinMAX';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* user.
|
|
3
|
+
* Represents the user's geography, used to determine which type of consent flow to display.
|
|
5
4
|
*/
|
|
6
5
|
export declare enum ConsentFlowUserGeography {
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* The user's geography could not be determined.
|
|
9
8
|
*/
|
|
10
9
|
UNKNOWN = "U",
|
|
11
10
|
/**
|
|
12
|
-
* The user is in GDPR region.
|
|
11
|
+
* The user is located in a GDPR region.
|
|
13
12
|
*/
|
|
14
13
|
GDPR = "G",
|
|
15
14
|
/**
|
|
16
|
-
* The user is in a
|
|
15
|
+
* The user is not in a GDPR region.
|
|
17
16
|
*/
|
|
18
17
|
OTHER = "O"
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* App tracking transparency status values as defined by the AppLovin SDK.
|
|
21
|
+
*
|
|
22
|
+
* These values are based on Apple's AppTrackingTransparency framework (iOS 14+).
|
|
23
23
|
*/
|
|
24
24
|
export declare enum AppTrackingStatus {
|
|
25
25
|
/**
|
|
26
|
-
* Device is
|
|
26
|
+
* Device is running an iOS version prior to iOS 14.
|
|
27
|
+
* AppTrackingTransparency is not available.
|
|
27
28
|
*/
|
|
28
29
|
UNAVAILABLE = "U",
|
|
29
30
|
/**
|
|
30
|
-
* The user has not yet
|
|
31
|
-
* data that can be used for tracking the user or the device.
|
|
31
|
+
* The user has not yet responded to the tracking authorization prompt.
|
|
32
32
|
*/
|
|
33
33
|
NOT_DETERMINED = "N",
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* is restricted.
|
|
35
|
+
* Tracking is restricted (e.g. due to parental controls).
|
|
37
36
|
*/
|
|
38
37
|
RESTRICTED = "R",
|
|
39
38
|
/**
|
|
40
|
-
* The user
|
|
41
|
-
* user or the device.
|
|
39
|
+
* The user denied authorization for tracking.
|
|
42
40
|
*/
|
|
43
41
|
DENIED = "D",
|
|
44
42
|
/**
|
|
45
|
-
* The user
|
|
46
|
-
* device.
|
|
43
|
+
* The user authorized tracking access.
|
|
47
44
|
*/
|
|
48
45
|
AUTHORIZED = "A"
|
|
49
46
|
}
|
|
50
47
|
/**
|
|
51
|
-
*
|
|
48
|
+
* Error codes returned from the Consent Management Platform (CMP) flow.
|
|
52
49
|
*/
|
|
53
50
|
export declare enum CMPErrorCode {
|
|
54
51
|
/**
|
|
55
|
-
*
|
|
52
|
+
* An unspecified error occurred.
|
|
56
53
|
*/
|
|
57
54
|
UNSPECIFIED = -1,
|
|
58
55
|
/**
|
|
59
|
-
*
|
|
56
|
+
* The CMP was not integrated correctly.
|
|
60
57
|
*/
|
|
61
58
|
INTEGRATION_ERROR = 1,
|
|
62
59
|
/**
|
|
63
|
-
*
|
|
60
|
+
* The CMP form is unavailable.
|
|
64
61
|
*/
|
|
65
62
|
FORM_UNAVAILABLE = 2,
|
|
66
63
|
/**
|
|
67
|
-
*
|
|
64
|
+
* The CMP form is not required for this user.
|
|
68
65
|
*/
|
|
69
66
|
FORM_NOT_REQUIRED = 3
|
|
70
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Main AppLovin MAX module interface exposed to JavaScript.
|
|
70
|
+
* Wraps the native module and overrides `initialize()` and `getSegments()` for custom handling.
|
|
71
|
+
*/
|
|
71
72
|
export declare const AppLovinMAX: AppLovinMAXType;
|
|
72
73
|
export default AppLovinMAX;
|
|
73
74
|
//# sourceMappingURL=AppLovinMAX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLovinMAX.d.ts","sourceRoot":"","sources":["../../../src/AppLovinMAX.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppLovinMAX.d.ts","sourceRoot":"","sources":["../../../src/AppLovinMAX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM3D;;GAEG;AACH,oBAAY,wBAAwB;IAChC;;OAEG;IACH,OAAO,MAAM;IAEb;;OAEG;IACH,IAAI,MAAM;IAEV;;OAEG;IACH,KAAK,MAAM;CACd;AAED;;;;GAIG;AACH,oBAAY,iBAAiB;IACzB;;;OAGG;IACH,WAAW,MAAM;IAEjB;;OAEG;IACH,cAAc,MAAM;IAEpB;;OAEG;IACH,UAAU,MAAM;IAEhB;;OAEG;IACH,MAAM,MAAM;IAEZ;;OAEG;IACH,UAAU,MAAM;CACnB;AAED;;GAEG;AACH,oBAAY,YAAY;IACpB;;OAEG;IACH,WAAW,KAAK;IAEhB;;OAEG;IACH,iBAAiB,IAAI;IAErB;;OAEG;IACH,gBAAgB,IAAI;IAEpB;;OAEG;IACH,iBAAiB,IAAI;CACxB;AAwCD;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,eASxB,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppOpenAd.d.ts","sourceRoot":"","sources":["../../../src/AppOpenAd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppOpenAd.d.ts","sourceRoot":"","sources":["../../../src/AppOpenAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAyFvD,eAAO,MAAM,SAAS,EAAE,aA4BvB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../src/BannerAd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../src/BannerAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA4HrD,eAAO,MAAM,QAAQ,EAAE,YA6CtB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,72 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* display.
|
|
2
|
+
* Error codes returned by the AppLovin MAX SDK when an ad fails to load or display.
|
|
4
3
|
*/
|
|
5
4
|
export declare enum ErrorCode {
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* An unspecified error occurred.
|
|
7
|
+
* See the `message` field for more details.
|
|
9
8
|
*/
|
|
10
9
|
UNSPECIFIED,
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
* app/device.
|
|
11
|
+
* No eligible ads were returned from any mediated networks.
|
|
14
12
|
*/
|
|
15
13
|
NO_FILL,
|
|
16
14
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* Eligible ads were returned but all failed to load.
|
|
16
|
+
* See `adLoadFailureInfo` for more details.
|
|
19
17
|
*/
|
|
20
18
|
AD_LOAD_FAILED,
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* An error occurred while attempting to display the ad.
|
|
23
21
|
*/
|
|
24
22
|
AD_DISPLAY_FAILED,
|
|
25
23
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* The ad request failed due to a general network issue.
|
|
25
|
+
* See the `message` field for details.
|
|
28
26
|
*/
|
|
29
27
|
NETWORK_ERROR,
|
|
30
28
|
/**
|
|
31
|
-
*
|
|
29
|
+
* The ad request timed out, likely due to a slow internet connection.
|
|
32
30
|
*/
|
|
33
31
|
NETWORK_TIMEOUT,
|
|
34
32
|
/**
|
|
35
|
-
*
|
|
36
|
-
* internet.
|
|
33
|
+
* The ad request failed because the device was offline.
|
|
37
34
|
*/
|
|
38
35
|
NO_NETWORK,
|
|
39
36
|
/**
|
|
40
|
-
*
|
|
41
|
-
* is still showing.
|
|
37
|
+
* A fullscreen ad was requested while another one was already showing.
|
|
42
38
|
*/
|
|
43
39
|
FULLSCREEN_AD_ALREADY_SHOWING,
|
|
44
40
|
/**
|
|
45
|
-
*
|
|
46
|
-
* loaded.
|
|
41
|
+
* A fullscreen ad was requested before it had finished loading.
|
|
47
42
|
*/
|
|
48
43
|
FULLSCREEN_AD_NOT_READY,
|
|
49
44
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* **iOS ONLY**.
|
|
45
|
+
* The ad was presented from an invalid view controller.
|
|
46
|
+
* **iOS only**.
|
|
53
47
|
*/
|
|
54
48
|
FULLSCREEN_AD_INVALID_VIEW_CONTROLLER,
|
|
55
49
|
/**
|
|
56
|
-
*
|
|
57
|
-
* "Don't Keep Activities" developer setting enabled.
|
|
58
|
-
* **Android
|
|
50
|
+
* The SDK was unable to display the ad because the
|
|
51
|
+
* "Don't Keep Activities" developer setting is enabled.
|
|
52
|
+
* **Android only**.
|
|
59
53
|
*/
|
|
60
54
|
DONT_KEEP_ACTIVITIES_ENABLED,
|
|
61
55
|
/**
|
|
62
|
-
*
|
|
63
|
-
* invalid ad unit identifier.
|
|
56
|
+
* The ad failed to load due to an invalid ad unit identifier.
|
|
64
57
|
*
|
|
65
|
-
* Possible
|
|
66
|
-
* 1.
|
|
67
|
-
* 2.
|
|
68
|
-
* 3.
|
|
69
|
-
* 4.
|
|
58
|
+
* Possible causes:
|
|
59
|
+
* 1. The ad unit ID is malformed or does not exist.
|
|
60
|
+
* 2. The ad unit is disabled.
|
|
61
|
+
* 3. The ad unit is not linked to the current app’s package name.
|
|
62
|
+
* 4. The ad unit was recently created (less than ~30–60 minutes ago).
|
|
70
63
|
*/
|
|
71
64
|
INVALID_AD_UNIT_ID
|
|
72
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../src/ErrorCode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../src/ErrorCode.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,oBAAY,SAAS;IACjB;;;OAGG;IACH,WAAwC;IAExC;;OAEG;IACH,OAAgC;IAEhC;;;OAGG;IACH,cAA8C;IAE9C;;OAEG;IACH,iBAAoD;IAEpD;;;OAGG;IACH,aAA4C;IAE5C;;OAEG;IACH,eAAgD;IAEhD;;OAEG;IACH,UAAsC;IAEtC;;OAEG;IACH,6BAA4E;IAE5E;;OAEG;IACH,uBAAgE;IAEhE;;;OAGG;IACH,qCAA4F;IAE5F;;;;OAIG;IACH,4BAA0E;IAE1E;;;;;;;;OAQG;IACH,kBAAsD;CACzD"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages AppLovin MAX ad event listeners using a shared NativeEventEmitter.
|
|
3
|
+
* Ensures only one active subscription per event type at any given time.
|
|
4
|
+
*/
|
|
1
5
|
import type { AdEventObject, AdEventListener } from './types/AdEvent';
|
|
6
|
+
/**
|
|
7
|
+
* Subscribes to a specific ad event.
|
|
8
|
+
* If a listener already exists for the event, it will be replaced.
|
|
9
|
+
*
|
|
10
|
+
* @param event - The event name to listen for.
|
|
11
|
+
* @param handler - The callback to handle the event.
|
|
12
|
+
*/
|
|
2
13
|
export declare const addEventListener: <T extends AdEventObject>(event: string, handler: AdEventListener<T>) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Unsubscribes from a specific ad event, if a listener exists.
|
|
16
|
+
*
|
|
17
|
+
* @param event - The event name to unsubscribe from.
|
|
18
|
+
*/
|
|
3
19
|
export declare const removeEventListener: (event: string) => void;
|
|
4
20
|
//# sourceMappingURL=EventEmitter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/EventEmitter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/EventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAStE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,aAAa,EAAE,OAAO,MAAM,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,KAAG,IAOtG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,IAMnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterstitialAd.d.ts","sourceRoot":"","sources":["../../../src/InterstitialAd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InterstitialAd.d.ts","sourceRoot":"","sources":["../../../src/InterstitialAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAyFjE,eAAO,MAAM,cAAc,EAAE,kBA4B5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MRecAd.d.ts","sourceRoot":"","sources":["../../../src/MRecAd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MRecAd.d.ts","sourceRoot":"","sources":["../../../src/MRecAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmGjD,eAAO,MAAM,MAAM,EAAE,UAmCpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Privacy.d.ts","sourceRoot":"","sources":["../../../src/Privacy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Privacy.d.ts","sourceRoot":"","sources":["../../../src/Privacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,eAAO,MAAM,OAAO,EAAE,WAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RewardedAd.d.ts","sourceRoot":"","sources":["../../../src/RewardedAd.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RewardedAd.d.ts","sourceRoot":"","sources":["../../../src/RewardedAd.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAoGzD,eAAO,MAAM,UAAU,EAAE,cAiCxB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { LocalExtraParameterValue } from './types/AdProps';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a record of string-based extra parameters into an array of `{ key, value }` objects.
|
|
4
|
+
* Used for sending extra parameters to the native SDK.
|
|
5
|
+
*
|
|
6
|
+
* @param input - An optional map of key-value string pairs (or null values).
|
|
7
|
+
* @returns An array of `{ key, value }` objects. Returns an empty array if input is undefined.
|
|
8
|
+
*/
|
|
9
|
+
export declare const makeExtraParametersArray: (input?: Record<string, string | null>) => {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string | null;
|
|
12
|
+
}[];
|
|
13
|
+
type LocalExtraParameterType = 'str' | 'bool';
|
|
14
|
+
type LocalExtraParameterValueMap = {
|
|
15
|
+
str: string | null;
|
|
16
|
+
bool: boolean | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Converts a map of local extra parameters into a filtered array of `{ key, value }` pairs.
|
|
20
|
+
* Only values matching the specified type (`'str'` or `'bool'`) are included.
|
|
21
|
+
*
|
|
22
|
+
* @param input - A record of local extra parameters (string, boolean, or null).
|
|
23
|
+
* @param type - The expected type of each value: `'str'` for strings, `'bool'` for booleans.
|
|
24
|
+
* @returns A filtered array of `{ key, value }` objects, cast to the specified type.
|
|
25
|
+
*/
|
|
26
|
+
export declare const makeLocalExtraParametersArray: <T extends LocalExtraParameterType>(input: Record<string, LocalExtraParameterValue> | undefined, type: T) => {
|
|
27
|
+
key: string;
|
|
28
|
+
value: LocalExtraParameterValueMap[T];
|
|
29
|
+
}[];
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=Utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/Utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EAIrH,CAAC;AAEF,KAAK,uBAAuB,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,KAAK,2BAA2B,GAAG;IAC/B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,GAAI,CAAC,SAAS,uBAAuB,EAC3E,OAAO,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAAG,SAAS,EAC3D,MAAM,CAAC,KACR;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAA;CAAE,EAWxD,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides the NativeAdView component, which manages loading and rendering of native ads using the
|
|
3
|
+
* AppLovin MAX SDK in React Native.
|
|
4
|
+
*/
|
|
1
5
|
import * as React from 'react';
|
|
2
6
|
import type { ViewProps } from 'react-native';
|
|
3
7
|
import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
4
8
|
/**
|
|
5
|
-
* The {@link NativeAdView} component
|
|
6
|
-
* renders it with the asset views:
|
|
9
|
+
* The {@link NativeAdView} component renders a native ad and binds it to asset views:
|
|
7
10
|
*
|
|
8
11
|
* - {@link IconView}
|
|
9
12
|
* - {@link TitleView}
|
|
@@ -13,19 +16,21 @@ import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
|
13
16
|
* - {@link MediaView}
|
|
14
17
|
* - {@link CallToActionView}
|
|
15
18
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
+
* Each asset view must be manually laid out and styled.
|
|
20
|
+
* The component automatically populates content once an ad is loaded.
|
|
21
|
+
* You can reload the ad using the component’s ref via `loadAd()`.
|
|
22
|
+
*
|
|
23
|
+
* **Note:** The AppLovin SDK must be initialized before using this component.
|
|
19
24
|
*
|
|
20
25
|
* ### Example:
|
|
21
|
-
* ```
|
|
26
|
+
* ```tsx
|
|
22
27
|
* <NativeAdView
|
|
23
28
|
* ref={nativeAdViewHandler}
|
|
24
29
|
* adUnitId={adUnitId}
|
|
25
30
|
* style={styles.nativead}
|
|
26
31
|
* onAdLoaded={(adInfo: AdInfo) => { ... }}
|
|
27
32
|
* >
|
|
28
|
-
* <View style={
|
|
33
|
+
* <View style={...}>
|
|
29
34
|
* <IconView style={styles.icon} />
|
|
30
35
|
* <TitleView style={styles.title} />
|
|
31
36
|
* <AdvertiserView style={styles.advertiser} />
|
|
@@ -37,6 +42,9 @@ import type { NativeAdViewHandler } from '../types/NativeAdViewProps';
|
|
|
37
42
|
* </View>
|
|
38
43
|
* </NativeAdView>
|
|
39
44
|
* ```
|
|
45
|
+
*
|
|
46
|
+
* For a complete implementation example, see:
|
|
47
|
+
* https://github.com/AppLovin/AppLovin-MAX-React-Native/blob/master/example/src/NativeAdViewExample.tsx
|
|
40
48
|
*/
|
|
41
49
|
export declare const NativeAdView: React.ForwardRefExoticComponent<import("../types/AdProps").AdProps & ViewProps & React.RefAttributes<NativeAdViewHandler>>;
|
|
42
50
|
//# sourceMappingURL=NativeAdView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdView.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"NativeAdView.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdView.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AAGzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,YAAY,4HAuBvB,CAAC"}
|
|
@@ -1,11 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides pre-styled React Native components for each native ad asset view:
|
|
3
|
+
*
|
|
4
|
+
* - TitleView
|
|
5
|
+
* - AdvertiserView
|
|
6
|
+
* - BodyView
|
|
7
|
+
* - CallToActionView
|
|
8
|
+
* - IconView
|
|
9
|
+
* - OptionsView
|
|
10
|
+
* - MediaView
|
|
11
|
+
* - StarRatingView
|
|
12
|
+
*
|
|
13
|
+
* Each component pulls ad content and view refs from NativeAdView context,
|
|
14
|
+
* and must be rendered inside a {@link NativeAdView}.
|
|
15
|
+
*/
|
|
1
16
|
import * as React from 'react';
|
|
2
17
|
import type { ViewProps, ImageProps, TextProps } from 'react-native';
|
|
18
|
+
/**
|
|
19
|
+
* Renders the native ad’s title.
|
|
20
|
+
*/
|
|
3
21
|
export declare const TitleView: (props: TextProps) => React.JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Renders the advertiser name.
|
|
24
|
+
*/
|
|
4
25
|
export declare const AdvertiserView: (props: TextProps) => React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Renders the ad’s body text (description).
|
|
28
|
+
*/
|
|
5
29
|
export declare const BodyView: (props: TextProps) => React.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Renders the call-to-action label.
|
|
32
|
+
* On iOS, wraps the text with a TouchableOpacity for better click behavior.
|
|
33
|
+
*/
|
|
6
34
|
export declare const CallToActionView: (props: TextProps) => React.JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Renders the icon image for the native ad.
|
|
37
|
+
* Falls back to a blank placeholder if not available.
|
|
38
|
+
*/
|
|
7
39
|
export declare const IconView: (props: Omit<ImageProps, "source">) => React.JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Renders the native ad’s options view.
|
|
42
|
+
*/
|
|
8
43
|
export declare const OptionsView: (props: ViewProps) => React.JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Renders the native ad’s media content.
|
|
46
|
+
*/
|
|
9
47
|
export declare const MediaView: (props: ViewProps) => React.JSX.Element;
|
|
10
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Props for the {@link StarRatingView} component, which displays a star rating
|
|
50
|
+
* using Unicode stars (★ and ☆) styled with color, shadow, and size.
|
|
51
|
+
*/
|
|
52
|
+
type StarRatingViewProps = ViewProps & {
|
|
53
|
+
/**
|
|
54
|
+
* The color used for filled (active) stars.
|
|
55
|
+
* Defaults to gold (#ffe234).
|
|
56
|
+
*/
|
|
57
|
+
color?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The color used for empty (inactive) stars.
|
|
60
|
+
* Defaults to light gray (#dedede).
|
|
61
|
+
*/
|
|
62
|
+
shadowColor?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The size of each star, which also determines their visual size.
|
|
65
|
+
* Defaults to 10.
|
|
66
|
+
*/
|
|
67
|
+
size?: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Renders the star rating of the ad, using Unicode stars (★ and ☆).
|
|
71
|
+
* Filled stars are rendered over hollow stars using a clipped view.
|
|
72
|
+
*/
|
|
73
|
+
export declare const StarRatingView: ({ color, shadowColor, size, style }: StarRatingViewProps) => React.JSX.Element;
|
|
74
|
+
export {};
|
|
11
75
|
//# sourceMappingURL=NativeAdViewComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdViewComponents.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewComponents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"NativeAdViewComponents.d.ts","sourceRoot":"","sources":["../../../../src/nativeAd/NativeAdViewComponents.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGrE;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,sBAOzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,sBAO9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,SAAS,sBAOxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,SAAS,sBAkBhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,sBAezD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,sBAG3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,sBAGzC,CAAC;AAEF;;;GAGG;AACH,KAAK,mBAAmB,GAAG,SAAS,GAAG;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,qCAAkE,mBAAmB,sBA+BnH,CAAC"}
|