react-native-applovin-max 9.1.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.
Files changed (46) hide show
  1. package/android/build.gradle +3 -3
  2. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdView.java +3 -9
  3. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXAdViewUiComponent.java +17 -8
  4. package/android/src/main/java/com/applovin/reactnative/AppLovinMAXModuleImpl.java +35 -14
  5. package/android/src/newarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
  6. package/android/src/oldarch/com/applovin/reactnative/AppLovinMAXModule.java +6 -6
  7. package/ios/AppLovinMAX.mm +35 -13
  8. package/ios/AppLovinMAXAdView.h +1 -0
  9. package/ios/AppLovinMAXAdView.mm +3 -9
  10. package/ios/AppLovinMAXAdViewUIComponent.h +1 -2
  11. package/ios/AppLovinMAXAdViewUIComponent.mm +18 -10
  12. package/lib/commonjs/AdView.js +3 -3
  13. package/lib/commonjs/AdView.js.map +1 -1
  14. package/lib/commonjs/AppLovinMAX.js +1 -1
  15. package/lib/commonjs/BannerAd.js +2 -3
  16. package/lib/commonjs/BannerAd.js.map +1 -1
  17. package/lib/commonjs/index.js +1 -2
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/nativeAd/NativeAdView.js +1 -2
  20. package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
  21. package/lib/commonjs/nativeAd/NativeAdViewComponents.js +1 -2
  22. package/lib/commonjs/nativeAd/NativeAdViewComponents.js.map +1 -1
  23. package/lib/commonjs/nativeAd/NativeAdViewProvider.js +1 -2
  24. package/lib/commonjs/nativeAd/NativeAdViewProvider.js.map +1 -1
  25. package/lib/commonjs/specs/NativeAppLovinMAXModule.js.map +1 -1
  26. package/lib/module/AdView.js +2 -1
  27. package/lib/module/AdView.js.map +1 -1
  28. package/lib/module/AppLovinMAX.js +1 -1
  29. package/lib/module/BannerAd.js +2 -3
  30. package/lib/module/BannerAd.js.map +1 -1
  31. package/lib/module/specs/NativeAppLovinMAXModule.js.map +1 -1
  32. package/lib/typescript/src/BannerAd.d.ts.map +1 -1
  33. package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts +3 -3
  34. package/lib/typescript/src/specs/NativeAppLovinMAXModule.d.ts.map +1 -1
  35. package/lib/typescript/src/types/AdViewProps.d.ts +4 -0
  36. package/lib/typescript/src/types/AdViewProps.d.ts.map +1 -1
  37. package/lib/typescript/src/types/BannerAd.d.ts +2 -1
  38. package/lib/typescript/src/types/BannerAd.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/react-native-applovin-max.podspec +2 -2
  41. package/src/AdView.tsx +2 -2
  42. package/src/AppLovinMAX.ts +1 -1
  43. package/src/BannerAd.ts +2 -3
  44. package/src/specs/NativeAppLovinMAXModule.ts +3 -2
  45. package/src/types/AdViewProps.ts +5 -0
  46. package/src/types/BannerAd.ts +2 -1
@@ -11,11 +11,11 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = { :ios => min_ios_version_supported }
14
- s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_9_1_0" }
14
+ s.source = { :git => "https://github.com/AppLovin/AppLovin-MAX-React-Native.git", :tag => "release_9_2_0" }
15
15
 
16
16
  s.source_files = "ios/AppLovinMAX*.{h,mm}"
17
17
 
18
- s.dependency "AppLovinSDK", "13.2.0"
18
+ s.dependency "AppLovinSDK", "13.3.0"
19
19
 
20
20
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
21
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
package/src/AdView.tsx CHANGED
@@ -239,8 +239,8 @@ export const AdView = forwardRef<AdViewHandler, AdViewProps & ViewProps>(functio
239
239
  * @throws An error if the preload request fails.
240
240
  */
241
241
  export const preloadNativeUIComponentAdView = async (adUnitId: string, adFormat: AdFormat, options: NativeUIComponentAdViewOptions = {}): Promise<AdViewId> => {
242
- const { placement = null, customData = null, extraParameters = {}, localExtraParameters = {} } = options;
243
- return AppLovinMAX.preloadNativeUIComponentAdView(adUnitId, adFormat, placement, customData, extraParameters, localExtraParameters);
242
+ const { isAdaptive = true, placement = null, customData = null, extraParameters = {}, localExtraParameters = {} } = options;
243
+ return AppLovinMAX.preloadNativeUIComponentAdView(adUnitId, adFormat, isAdaptive, placement, customData, extraParameters, localExtraParameters);
244
244
  };
245
245
 
246
246
  /**
@@ -2,7 +2,7 @@ import type { AppLovinMAXType } from './types/AppLovinMAX';
2
2
  import type { Configuration } from './types/Configuration';
3
3
  import NativeAppLovinMAX from './specs/NativeAppLovinMAXModule';
4
4
 
5
- const VERSION = '9.1.0';
5
+ const VERSION = '9.2.0';
6
6
 
7
7
  /**
8
8
  * Represents the user's geography, used to determine which type of consent flow to display.
package/src/BannerAd.ts CHANGED
@@ -14,9 +14,8 @@ const {
14
14
  ON_BANNER_AD_REVENUE_PAID,
15
15
  } = AppLovinMAX.getConstants();
16
16
 
17
- const createAd = (adUnitId: string, position: AdViewPosition, xOffset: number = 0, yOffset: number = 0): void => {
18
- AppLovinMAX.createBannerWithOffsets(adUnitId, position, xOffset, yOffset);
19
- AppLovinMAX.setBannerExtraParameter(adUnitId, 'adaptive_banner', 'true');
17
+ const createAd = (adUnitId: string, position: AdViewPosition, xOffset: number = 0, yOffset: number = 0, isAdaptive: boolean = true): void => {
18
+ AppLovinMAX.createBannerWithOffsets(adUnitId, position, xOffset, yOffset, isAdaptive);
20
19
  };
21
20
 
22
21
  const destroyAd = (adUnitId: string): void => {
@@ -136,8 +136,8 @@ export interface Spec extends TurboModule {
136
136
  // Banner Ads
137
137
  // ─────────────────────────────────────────────────────────
138
138
 
139
- createBanner(adUnitId: string, position: string): void;
140
- createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number): void;
139
+ createBanner(adUnitId: string, position: string, isAdaptive: boolean): void;
140
+ createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number, isAdaptive: boolean): void;
141
141
  setBannerBackgroundColor(adUnitId: string, hexColorCode: string): void;
142
142
  setBannerPlacement(adUnitId: string, placement: string | null): void;
143
143
  setBannerCustomData(adUnitId: string, customData: string | null): void;
@@ -206,6 +206,7 @@ export interface Spec extends TurboModule {
206
206
  preloadNativeUIComponentAdView(
207
207
  adUnitId: string,
208
208
  adFormat: string,
209
+ isAdaptive: boolean,
209
210
  placement?: string | null,
210
211
  customData?: string | null,
211
212
  extraParameters?: UnsafeObject | null,
@@ -72,6 +72,11 @@ export type AdViewProps = AdProps & {
72
72
  * Options used when preloading a native UI {@link AdView} component.
73
73
  */
74
74
  export type NativeUIComponentAdViewOptions = {
75
+ /**
76
+ * Whether adaptive banner sizing is enabled. Defaults to `true`.
77
+ */
78
+ isAdaptive?: boolean;
79
+
75
80
  /**
76
81
  * The placement name used for analytics and reporting.
77
82
  */
@@ -13,8 +13,9 @@ export type BannerAdType = ViewAdType & {
13
13
  * @param position - The position of the banner on screen.
14
14
  * @param xOffset - Optional horizontal offset from the left (default: 0).
15
15
  * @param yOffset - Optional vertical offset from the top (default: 0).
16
+ * @param isAdaptive - Optional flag to enable adaptive banners (default: true).
16
17
  */
17
- createAd(adUnitId: string, position: AdViewPosition, xOffset?: number, yOffset?: number): void;
18
+ createAd(adUnitId: string, position: AdViewPosition, xOffset?: number, yOffset?: number, isAdaptive?: boolean): void;
18
19
 
19
20
  /**
20
21
  * Sets the background color of the banner.