react-native-daro 2.0.6 → 2.0.8

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 (129) hide show
  1. package/README.md +2 -2
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/daro/reactnative/DaroRNAdBannerViewManager.kt +3 -3
  4. package/android/src/main/java/com/daro/reactnative/DaroRNAdNativeViewManager.kt +3 -3
  5. package/android/src/main/java/com/daro/reactnative/DaroRNModule.kt +34 -34
  6. package/android/src/main/java/com/daro/reactnative/impl/DaroRNInterstitialModuleImpl.kt +13 -13
  7. package/android/src/main/java/com/daro/reactnative/impl/DaroRNLightPopupModuleImpl.kt +12 -12
  8. package/android/src/main/java/com/daro/reactnative/impl/DaroRNRewardedAdModuleImpl.kt +14 -14
  9. package/android/src/main/java/com/daro/reactnative/util/AdInfoUtil.kt +16 -16
  10. package/android/src/main/java/com/daro/reactnative/view/DaroRNAdBannerViewContainer.kt +8 -8
  11. package/android/src/main/java/com/daro/reactnative/view/DaroRNAdNativeViewContainer.kt +8 -8
  12. package/android/src/oldarch/java/com/daro/reactnative/DaroRNModuleSpec.kt +14 -14
  13. package/ios/DaroRNModule+AppOpen.swift +9 -9
  14. package/ios/DaroRNModule+Interstitial.swift +9 -9
  15. package/ios/DaroRNModule+LightPopup.swift +13 -13
  16. package/ios/DaroRNModule+Rewarded.swift +14 -14
  17. package/ios/DaroRNModule.mm +14 -14
  18. package/ios/DaroRNModule.swift +1 -1
  19. package/ios/Fabric/DaroRNAdBannerComponentView.mm +7 -7
  20. package/ios/Fabric/DaroRNNativeAdComponentView.mm +7 -7
  21. package/ios/Paper/DaroRNAdBannerViewManager.m +1 -1
  22. package/ios/Paper/DaroRNNativeAdViewManager.m +1 -1
  23. package/ios/Shared/DaroRNBannerAdView.swift +8 -8
  24. package/ios/Shared/DaroRNNativeAdView.swift +14 -14
  25. package/lib/commonjs/AdBannerView.js +2 -2
  26. package/lib/commonjs/AdBannerView.js.map +1 -1
  27. package/lib/commonjs/AppOpenAd.js +22 -22
  28. package/lib/commonjs/AppOpenAd.js.map +1 -1
  29. package/lib/commonjs/DaroRNAdBannerViewNativeComponent.ts +3 -3
  30. package/lib/commonjs/DaroRNNativeAdViewNativeComponent.ts +3 -3
  31. package/lib/commonjs/InterstitialAd.js +24 -24
  32. package/lib/commonjs/InterstitialAd.js.map +1 -1
  33. package/lib/commonjs/LightPopupAd.js +27 -27
  34. package/lib/commonjs/LightPopupAd.js.map +1 -1
  35. package/lib/commonjs/RewardedAd.js +22 -22
  36. package/lib/commonjs/RewardedAd.js.map +1 -1
  37. package/lib/commonjs/hooks/useInterstitialAd.js +6 -6
  38. package/lib/commonjs/hooks/useInterstitialAd.js.map +1 -1
  39. package/lib/commonjs/hooks/useLightPopupAd.js +5 -5
  40. package/lib/commonjs/hooks/useLightPopupAd.js.map +1 -1
  41. package/lib/commonjs/hooks/useRewardedAd.js +6 -6
  42. package/lib/commonjs/hooks/useRewardedAd.js.map +1 -1
  43. package/lib/commonjs/nativeAd/NativeAdView.js +2 -2
  44. package/lib/commonjs/nativeAd/NativeAdView.js.map +1 -1
  45. package/lib/module/AdBannerView.js +2 -2
  46. package/lib/module/AdBannerView.js.map +1 -1
  47. package/lib/module/AppOpenAd.js +22 -22
  48. package/lib/module/AppOpenAd.js.map +1 -1
  49. package/lib/module/DaroRNAdBannerViewNativeComponent.ts +3 -3
  50. package/lib/module/DaroRNNativeAdViewNativeComponent.ts +3 -3
  51. package/lib/module/InterstitialAd.js +24 -24
  52. package/lib/module/InterstitialAd.js.map +1 -1
  53. package/lib/module/LightPopupAd.js +27 -27
  54. package/lib/module/LightPopupAd.js.map +1 -1
  55. package/lib/module/RewardedAd.js +22 -22
  56. package/lib/module/RewardedAd.js.map +1 -1
  57. package/lib/module/hooks/useInterstitialAd.js +6 -6
  58. package/lib/module/hooks/useInterstitialAd.js.map +1 -1
  59. package/lib/module/hooks/useLightPopupAd.js +5 -5
  60. package/lib/module/hooks/useLightPopupAd.js.map +1 -1
  61. package/lib/module/hooks/useRewardedAd.js +6 -6
  62. package/lib/module/hooks/useRewardedAd.js.map +1 -1
  63. package/lib/module/nativeAd/NativeAdView.js +2 -2
  64. package/lib/module/nativeAd/NativeAdView.js.map +1 -1
  65. package/lib/typescript/commonjs/src/AppOpenAd.d.ts +8 -8
  66. package/lib/typescript/commonjs/src/AppOpenAd.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/src/DaroRNAdBannerViewNativeComponent.d.ts +3 -3
  68. package/lib/typescript/commonjs/src/DaroRNAdBannerViewNativeComponent.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/DaroRNNativeAdViewNativeComponent.d.ts +3 -3
  70. package/lib/typescript/commonjs/src/DaroRNNativeAdViewNativeComponent.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/InterstitialAd.d.ts +8 -8
  72. package/lib/typescript/commonjs/src/InterstitialAd.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/LightPopupAd.d.ts +9 -9
  74. package/lib/typescript/commonjs/src/LightPopupAd.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/NativeDaroModule.d.ts +14 -14
  76. package/lib/typescript/commonjs/src/NativeDaroModule.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/src/RewardedAd.d.ts +8 -8
  78. package/lib/typescript/commonjs/src/RewardedAd.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/src/hooks/useInterstitialAd.d.ts +1 -1
  80. package/lib/typescript/commonjs/src/hooks/useInterstitialAd.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/src/hooks/useLightPopupAd.d.ts +1 -1
  82. package/lib/typescript/commonjs/src/hooks/useLightPopupAd.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/src/hooks/useRewardedAd.d.ts +1 -1
  84. package/lib/typescript/commonjs/src/hooks/useRewardedAd.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/types/AdInfo.d.ts +2 -2
  86. package/lib/typescript/commonjs/src/types/AdInfo.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/types/AdProps.d.ts +1 -1
  88. package/lib/typescript/commonjs/src/types/AdProps.d.ts.map +1 -1
  89. package/lib/typescript/module/src/AppOpenAd.d.ts +8 -8
  90. package/lib/typescript/module/src/AppOpenAd.d.ts.map +1 -1
  91. package/lib/typescript/module/src/DaroRNAdBannerViewNativeComponent.d.ts +3 -3
  92. package/lib/typescript/module/src/DaroRNAdBannerViewNativeComponent.d.ts.map +1 -1
  93. package/lib/typescript/module/src/DaroRNNativeAdViewNativeComponent.d.ts +3 -3
  94. package/lib/typescript/module/src/DaroRNNativeAdViewNativeComponent.d.ts.map +1 -1
  95. package/lib/typescript/module/src/InterstitialAd.d.ts +8 -8
  96. package/lib/typescript/module/src/InterstitialAd.d.ts.map +1 -1
  97. package/lib/typescript/module/src/LightPopupAd.d.ts +9 -9
  98. package/lib/typescript/module/src/LightPopupAd.d.ts.map +1 -1
  99. package/lib/typescript/module/src/NativeDaroModule.d.ts +14 -14
  100. package/lib/typescript/module/src/NativeDaroModule.d.ts.map +1 -1
  101. package/lib/typescript/module/src/RewardedAd.d.ts +8 -8
  102. package/lib/typescript/module/src/RewardedAd.d.ts.map +1 -1
  103. package/lib/typescript/module/src/hooks/useInterstitialAd.d.ts +1 -1
  104. package/lib/typescript/module/src/hooks/useInterstitialAd.d.ts.map +1 -1
  105. package/lib/typescript/module/src/hooks/useLightPopupAd.d.ts +1 -1
  106. package/lib/typescript/module/src/hooks/useLightPopupAd.d.ts.map +1 -1
  107. package/lib/typescript/module/src/hooks/useRewardedAd.d.ts +1 -1
  108. package/lib/typescript/module/src/hooks/useRewardedAd.d.ts.map +1 -1
  109. package/lib/typescript/module/src/types/AdInfo.d.ts +2 -2
  110. package/lib/typescript/module/src/types/AdInfo.d.ts.map +1 -1
  111. package/lib/typescript/module/src/types/AdProps.d.ts +1 -1
  112. package/lib/typescript/module/src/types/AdProps.d.ts.map +1 -1
  113. package/package.json +1 -1
  114. package/plugin/build/withAndroid.js +2 -2
  115. package/react-native-daro.podspec +1 -1
  116. package/src/AdBannerView.tsx +2 -2
  117. package/src/AppOpenAd.ts +21 -21
  118. package/src/DaroRNAdBannerViewNativeComponent.ts +3 -3
  119. package/src/DaroRNNativeAdViewNativeComponent.ts +3 -3
  120. package/src/InterstitialAd.ts +23 -23
  121. package/src/LightPopupAd.ts +26 -26
  122. package/src/NativeDaroModule.ts +14 -14
  123. package/src/RewardedAd.ts +21 -21
  124. package/src/hooks/useInterstitialAd.ts +6 -6
  125. package/src/hooks/useLightPopupAd.ts +5 -5
  126. package/src/hooks/useRewardedAd.ts +6 -6
  127. package/src/nativeAd/NativeAdView.tsx +2 -2
  128. package/src/types/AdInfo.ts +2 -2
  129. package/src/types/AdProps.ts +1 -1
@@ -94,37 +94,37 @@ export class LightPopupAd {
94
94
 
95
95
  private constructor(
96
96
  private readonly requestId: number,
97
- private readonly adUnitId: string
97
+ private readonly adUnitKey: string
98
98
  ) {}
99
99
 
100
- static createForAdRequest(adUnitId: string): LightPopupAd {
100
+ static createForAdRequest(adUnitKey: string): LightPopupAd {
101
101
  const requestId = LightPopupAd._nextRequestId++;
102
- return new LightPopupAd(requestId, adUnitId);
102
+ return new LightPopupAd(requestId, adUnitKey);
103
103
  }
104
104
 
105
105
  isAdReady(): Promise<boolean> {
106
106
  if (this.destroyed) return Promise.resolve(false);
107
107
  return NativeDaroModule.isLightPopupReady(
108
108
  this.requestId,
109
- this.adUnitId
109
+ this.adUnitKey
110
110
  ).then((ready) => !this.destroyed && ready);
111
111
  }
112
112
 
113
113
  load(): void {
114
114
  if (this.destroyed) return;
115
- NativeDaroModule.loadLightPopup(this.requestId, this.adUnitId);
115
+ NativeDaroModule.loadLightPopup(this.requestId, this.adUnitKey);
116
116
  }
117
117
 
118
118
  show(): void {
119
119
  if (this.destroyed) return;
120
- NativeDaroModule.showLightPopup(this.requestId, this.adUnitId);
120
+ NativeDaroModule.showLightPopup(this.requestId, this.adUnitKey);
121
121
  }
122
122
 
123
123
  setConfiguration(configuration: LightPopupAdConfiguration): void {
124
124
  if (this.destroyed) return;
125
125
  NativeDaroModule.setLightPopupAdConfiguration(
126
126
  this.requestId,
127
- this.adUnitId,
127
+ this.adUnitKey,
128
128
  normalizeConfiguration(configuration)
129
129
  );
130
130
  }
@@ -153,16 +153,16 @@ export class LightPopupAd {
153
153
  if (this.destroyed) return;
154
154
  this.destroyed = true;
155
155
  this.removeAllListeners();
156
- NativeDaroModule.destroyLightPopup(this.requestId, this.adUnitId);
156
+ NativeDaroModule.destroyLightPopup(this.requestId, this.adUnitKey);
157
157
  }
158
158
 
159
159
  // ---- Deprecated static API (backward compatibility) ----
160
160
 
161
- private static _getLegacyRequestId(adUnitId: string): number {
162
- let requestId = LightPopupAd._legacyRequestIds.get(adUnitId);
161
+ private static _getLegacyRequestId(adUnitKey: string): number {
162
+ let requestId = LightPopupAd._legacyRequestIds.get(adUnitKey);
163
163
  if (requestId === undefined) {
164
164
  requestId = LightPopupAd._nextRequestId++;
165
- LightPopupAd._legacyRequestIds.set(adUnitId, requestId);
165
+ LightPopupAd._legacyRequestIds.set(adUnitKey, requestId);
166
166
  LightPopupAd._legacyRequestIdSet.add(requestId);
167
167
  }
168
168
  return requestId;
@@ -180,33 +180,33 @@ export class LightPopupAd {
180
180
  });
181
181
  }
182
182
 
183
- /** @deprecated `LightPopupAd.createForAdRequest(adUnitId)` 인스턴스의 `isAdReady()`를 사용하세요. */
184
- static isAdReady(adUnitId: string): Promise<boolean> {
185
- const requestId = LightPopupAd._getLegacyRequestId(adUnitId);
186
- return NativeDaroModule.isLightPopupReady(requestId, adUnitId);
183
+ /** @deprecated `LightPopupAd.createForAdRequest(adUnitKey)` 인스턴스의 `isAdReady()`를 사용하세요. */
184
+ static isAdReady(adUnitKey: string): Promise<boolean> {
185
+ const requestId = LightPopupAd._getLegacyRequestId(adUnitKey);
186
+ return NativeDaroModule.isLightPopupReady(requestId, adUnitKey);
187
187
  }
188
188
 
189
- /** @deprecated `LightPopupAd.createForAdRequest(adUnitId)` 인스턴스의 `load()`를 사용하세요. */
190
- static loadAd(adUnitId: string): void {
191
- const requestId = LightPopupAd._getLegacyRequestId(adUnitId);
192
- NativeDaroModule.loadLightPopup(requestId, adUnitId);
189
+ /** @deprecated `LightPopupAd.createForAdRequest(adUnitKey)` 인스턴스의 `load()`를 사용하세요. */
190
+ static loadAd(adUnitKey: string): void {
191
+ const requestId = LightPopupAd._getLegacyRequestId(adUnitKey);
192
+ NativeDaroModule.loadLightPopup(requestId, adUnitKey);
193
193
  }
194
194
 
195
- /** @deprecated `LightPopupAd.createForAdRequest(adUnitId)` 인스턴스의 `show()`를 사용하세요. */
196
- static showAd(adUnitId: string): void {
197
- const requestId = LightPopupAd._getLegacyRequestId(adUnitId);
198
- NativeDaroModule.showLightPopup(requestId, adUnitId);
195
+ /** @deprecated `LightPopupAd.createForAdRequest(adUnitKey)` 인스턴스의 `show()`를 사용하세요. */
196
+ static showAd(adUnitKey: string): void {
197
+ const requestId = LightPopupAd._getLegacyRequestId(adUnitKey);
198
+ NativeDaroModule.showLightPopup(requestId, adUnitKey);
199
199
  }
200
200
 
201
201
  /** @deprecated 인스턴스의 `setConfiguration()`을 사용하세요. */
202
202
  static setLightPopupAdConfiguration(
203
- adUnitId: string,
203
+ adUnitKey: string,
204
204
  configuration: LightPopupAdConfiguration
205
205
  ): void {
206
- const requestId = LightPopupAd._getLegacyRequestId(adUnitId);
206
+ const requestId = LightPopupAd._getLegacyRequestId(adUnitKey);
207
207
  NativeDaroModule.setLightPopupAdConfiguration(
208
208
  requestId,
209
- adUnitId,
209
+ adUnitKey,
210
210
  normalizeConfiguration(configuration)
211
211
  );
212
212
  }
@@ -73,34 +73,34 @@ export interface Spec extends TurboModule {
73
73
 
74
74
  isInterstitialReady: (
75
75
  requestId: Double,
76
- adUnitId: string
76
+ adUnitKey: string
77
77
  ) => Promise<boolean>;
78
- loadInterstitial: (requestId: Double, adUnitId: string) => Promise<void>;
79
- showInterstitial: (requestId: Double, adUnitId: string) => Promise<void>;
78
+ loadInterstitial: (requestId: Double, adUnitKey: string) => Promise<void>;
79
+ showInterstitial: (requestId: Double, adUnitKey: string) => Promise<void>;
80
80
 
81
- isRewardedAdReady: (requestId: Double, adUnitId: string) => Promise<boolean>;
82
- loadRewardedAd: (requestId: Double, adUnitId: string) => Promise<void>;
81
+ isRewardedAdReady: (requestId: Double, adUnitKey: string) => Promise<boolean>;
82
+ loadRewardedAd: (requestId: Double, adUnitKey: string) => Promise<void>;
83
83
  showRewardedAd: (
84
84
  requestId: Double,
85
- adUnitId: string,
85
+ adUnitKey: string,
86
86
  customData?: string | null
87
87
  ) => Promise<void>;
88
88
 
89
- isAppOpenAdReady: (requestId: Double, adUnitId: string) => Promise<boolean>;
90
- loadAppOpenAd: (requestId: Double, adUnitId: string) => Promise<void>;
89
+ isAppOpenAdReady: (requestId: Double, adUnitKey: string) => Promise<boolean>;
90
+ loadAppOpenAd: (requestId: Double, adUnitKey: string) => Promise<void>;
91
91
  showAppOpenAd: (
92
92
  requestId: Double,
93
- adUnitId: string,
93
+ adUnitKey: string,
94
94
  customData?: string | null
95
95
  ) => Promise<void>;
96
96
 
97
- isLightPopupReady: (requestId: Double, adUnitId: string) => Promise<boolean>;
98
- loadLightPopup: (requestId: Double, adUnitId: string) => Promise<void>;
99
- destroyLightPopup: (requestId: Double, adUnitId: string) => void;
100
- showLightPopup: (requestId: Double, adUnitId: string) => Promise<void>;
97
+ isLightPopupReady: (requestId: Double, adUnitKey: string) => Promise<boolean>;
98
+ loadLightPopup: (requestId: Double, adUnitKey: string) => Promise<void>;
99
+ destroyLightPopup: (requestId: Double, adUnitKey: string) => void;
100
+ showLightPopup: (requestId: Double, adUnitKey: string) => Promise<void>;
101
101
  setLightPopupAdConfiguration: (
102
102
  requestId: Double,
103
- adUnitId: string,
103
+ adUnitKey: string,
104
104
  configuration: UnsafeObject
105
105
  ) => Promise<void>;
106
106
  }
package/src/RewardedAd.ts CHANGED
@@ -48,26 +48,26 @@ export class RewardedAd {
48
48
 
49
49
  private constructor(
50
50
  private readonly requestId: number,
51
- private readonly adUnitId: string
51
+ private readonly adUnitKey: string
52
52
  ) {}
53
53
 
54
- static createForAdRequest(adUnitId: string): RewardedAd {
54
+ static createForAdRequest(adUnitKey: string): RewardedAd {
55
55
  const requestId = RewardedAd._nextRequestId++;
56
- return new RewardedAd(requestId, adUnitId);
56
+ return new RewardedAd(requestId, adUnitKey);
57
57
  }
58
58
 
59
59
  isAdReady(): Promise<boolean> {
60
- return NativeDaroModule.isRewardedAdReady(this.requestId, this.adUnitId);
60
+ return NativeDaroModule.isRewardedAdReady(this.requestId, this.adUnitKey);
61
61
  }
62
62
 
63
63
  load(): void {
64
- NativeDaroModule.loadRewardedAd(this.requestId, this.adUnitId);
64
+ NativeDaroModule.loadRewardedAd(this.requestId, this.adUnitKey);
65
65
  }
66
66
 
67
67
  show(customData?: string | null): void {
68
68
  NativeDaroModule.showRewardedAd(
69
69
  this.requestId,
70
- this.adUnitId,
70
+ this.adUnitKey,
71
71
  customData ?? null
72
72
  );
73
73
  }
@@ -92,11 +92,11 @@ export class RewardedAd {
92
92
 
93
93
  // ---- Deprecated static API (backward compatibility) ----
94
94
 
95
- private static _getLegacyRequestId(adUnitId: string): number {
96
- let requestId = RewardedAd._legacyRequestIds.get(adUnitId);
95
+ private static _getLegacyRequestId(adUnitKey: string): number {
96
+ let requestId = RewardedAd._legacyRequestIds.get(adUnitKey);
97
97
  if (requestId === undefined) {
98
98
  requestId = RewardedAd._nextRequestId++;
99
- RewardedAd._legacyRequestIds.set(adUnitId, requestId);
99
+ RewardedAd._legacyRequestIds.set(adUnitKey, requestId);
100
100
  RewardedAd._legacyRequestIdSet.add(requestId);
101
101
  }
102
102
  return requestId;
@@ -114,22 +114,22 @@ export class RewardedAd {
114
114
  });
115
115
  }
116
116
 
117
- /** @deprecated `RewardedAd.createForAdRequest(adUnitId)` 인스턴스의 `isAdReady()`를 사용하세요. */
118
- static isAdReady(adUnitId: string): Promise<boolean> {
119
- const requestId = RewardedAd._getLegacyRequestId(adUnitId);
120
- return NativeDaroModule.isRewardedAdReady(requestId, adUnitId);
117
+ /** @deprecated `RewardedAd.createForAdRequest(adUnitKey)` 인스턴스의 `isAdReady()`를 사용하세요. */
118
+ static isAdReady(adUnitKey: string): Promise<boolean> {
119
+ const requestId = RewardedAd._getLegacyRequestId(adUnitKey);
120
+ return NativeDaroModule.isRewardedAdReady(requestId, adUnitKey);
121
121
  }
122
122
 
123
- /** @deprecated `RewardedAd.createForAdRequest(adUnitId)` 인스턴스의 `load()`를 사용하세요. */
124
- static loadAd(adUnitId: string): void {
125
- const requestId = RewardedAd._getLegacyRequestId(adUnitId);
126
- NativeDaroModule.loadRewardedAd(requestId, adUnitId);
123
+ /** @deprecated `RewardedAd.createForAdRequest(adUnitKey)` 인스턴스의 `load()`를 사용하세요. */
124
+ static loadAd(adUnitKey: string): void {
125
+ const requestId = RewardedAd._getLegacyRequestId(adUnitKey);
126
+ NativeDaroModule.loadRewardedAd(requestId, adUnitKey);
127
127
  }
128
128
 
129
- /** @deprecated `RewardedAd.createForAdRequest(adUnitId)` 인스턴스의 `show()`를 사용하세요. */
130
- static showAd(adUnitId: string, customData?: string | null): void {
131
- const requestId = RewardedAd._getLegacyRequestId(adUnitId);
132
- NativeDaroModule.showRewardedAd(requestId, adUnitId, customData ?? null);
129
+ /** @deprecated `RewardedAd.createForAdRequest(adUnitKey)` 인스턴스의 `show()`를 사용하세요. */
130
+ static showAd(adUnitKey: string, customData?: string | null): void {
131
+ const requestId = RewardedAd._getLegacyRequestId(adUnitKey);
132
+ NativeDaroModule.showRewardedAd(requestId, adUnitKey, customData ?? null);
133
133
  }
134
134
 
135
135
  /** @deprecated `addAdEventListener(AdEventType.LOADED, ...)`를 인스턴스에서 사용하세요. */
@@ -26,7 +26,7 @@ export type UseInterstitialAdResult = {
26
26
  };
27
27
 
28
28
  export function useInterstitialAd(
29
- adUnitId: string | null,
29
+ adUnitKey: string | null,
30
30
  options: UseInterstitialAdOptions = {}
31
31
  ): UseInterstitialAdResult {
32
32
  const adRef = useRef<InterstitialAd | null>(null);
@@ -38,7 +38,7 @@ export function useInterstitialAd(
38
38
  });
39
39
 
40
40
  const load = useCallback(() => {
41
- if (!adUnitId) {
41
+ if (!adUnitKey) {
42
42
  return;
43
43
  }
44
44
 
@@ -49,7 +49,7 @@ export function useInterstitialAd(
49
49
 
50
50
  setState({ isLoaded: false, isLoading: true });
51
51
  ad.load();
52
- }, [adUnitId]);
52
+ }, [adUnitKey]);
53
53
 
54
54
  const show = useCallback(() => {
55
55
  adRef.current?.show();
@@ -66,11 +66,11 @@ export function useInterstitialAd(
66
66
  adRef.current = null;
67
67
  setState({ isLoaded: false, isLoading: false });
68
68
 
69
- if (!adUnitId) {
69
+ if (!adUnitKey) {
70
70
  return;
71
71
  }
72
72
 
73
- const ad = InterstitialAd.createForAdRequest(adUnitId);
73
+ const ad = InterstitialAd.createForAdRequest(adUnitKey);
74
74
  adRef.current = ad;
75
75
 
76
76
  ad.addAdEventListener(AdEventType.LOADED, (info) => {
@@ -106,7 +106,7 @@ export function useInterstitialAd(
106
106
  adRef.current = null;
107
107
  }
108
108
  };
109
- }, [adUnitId]);
109
+ }, [adUnitKey]);
110
110
 
111
111
  return {
112
112
  ...state,
@@ -31,7 +31,7 @@ export type UseLightPopupAdResult = {
31
31
  };
32
32
 
33
33
  export function useLightPopupAd(
34
- adUnitId: string | null,
34
+ adUnitKey: string | null,
35
35
  options: UseLightPopupAdOptions = {}
36
36
  ): UseLightPopupAdResult {
37
37
  const adRef = useRef<LightPopupAd | null>(null);
@@ -43,13 +43,13 @@ export function useLightPopupAd(
43
43
  });
44
44
 
45
45
  const createAd = useCallback(() => {
46
- if (!adUnitId) {
46
+ if (!adUnitKey) {
47
47
  return null;
48
48
  }
49
49
 
50
50
  adRef.current?.destroy();
51
51
 
52
- const ad = LightPopupAd.createForAdRequest(adUnitId);
52
+ const ad = LightPopupAd.createForAdRequest(adUnitKey);
53
53
  adRef.current = ad;
54
54
 
55
55
  ad.addAdEventListener(AdEventType.LOADED, (info) => {
@@ -80,7 +80,7 @@ export function useLightPopupAd(
80
80
  });
81
81
 
82
82
  return ad;
83
- }, [adUnitId]);
83
+ }, [adUnitKey]);
84
84
 
85
85
  const load = useCallback(
86
86
  (loadOptions?: UseLightPopupAdLoadOptions) => {
@@ -116,7 +116,7 @@ export function useLightPopupAd(
116
116
  adRef.current?.destroy();
117
117
  adRef.current = null;
118
118
  setState({ isLoaded: false, isLoading: false });
119
- }, [adUnitId]);
119
+ }, [adUnitKey]);
120
120
 
121
121
  useEffect(() => {
122
122
  return () => {
@@ -28,7 +28,7 @@ export type UseRewardedAdResult = {
28
28
  };
29
29
 
30
30
  export function useRewardedAd(
31
- adUnitId: string | null,
31
+ adUnitKey: string | null,
32
32
  options: UseRewardedAdOptions = {}
33
33
  ): UseRewardedAdResult {
34
34
  const adRef = useRef<RewardedAd | null>(null);
@@ -40,7 +40,7 @@ export function useRewardedAd(
40
40
  });
41
41
 
42
42
  const load = useCallback(() => {
43
- if (!adUnitId) {
43
+ if (!adUnitKey) {
44
44
  return;
45
45
  }
46
46
 
@@ -51,7 +51,7 @@ export function useRewardedAd(
51
51
 
52
52
  setState({ isLoaded: false, isLoading: true });
53
53
  ad.load();
54
- }, [adUnitId]);
54
+ }, [adUnitKey]);
55
55
 
56
56
  const show = useCallback((customData?: string | null) => {
57
57
  adRef.current?.show(customData);
@@ -68,11 +68,11 @@ export function useRewardedAd(
68
68
  adRef.current = null;
69
69
  setState({ isLoaded: false, isLoading: false });
70
70
 
71
- if (!adUnitId) {
71
+ if (!adUnitKey) {
72
72
  return;
73
73
  }
74
74
 
75
- const ad = RewardedAd.createForAdRequest(adUnitId);
75
+ const ad = RewardedAd.createForAdRequest(adUnitKey);
76
76
  adRef.current = ad;
77
77
 
78
78
  ad.addAdEventListener(AdEventType.LOADED, (info) => {
@@ -111,7 +111,7 @@ export function useRewardedAd(
111
111
  adRef.current = null;
112
112
  }
113
113
  };
114
- }, [adUnitId]);
114
+ }, [adUnitKey]);
115
115
 
116
116
  return {
117
117
  ...state,
@@ -68,7 +68,7 @@ const NativeAdViewImpl = forwardRef<
68
68
  NativeAdViewProps & ViewProps
69
69
  >(function NativeAdViewImpl(
70
70
  {
71
- adUnitId,
71
+ adUnitKey,
72
72
  onAdLoaded,
73
73
  onNativeAdAssetLoaded,
74
74
  onAdLoadFailed,
@@ -145,7 +145,7 @@ const NativeAdViewImpl = forwardRef<
145
145
  <NativeAdViewNativeComponent
146
146
  ref={saveElement}
147
147
  {...otherProps}
148
- adUnitId={adUnitId}
148
+ adUnitKey={adUnitKey}
149
149
  loadOnMount={loadOnMount}
150
150
  adChoicesPosition={adChoicesPosition}
151
151
  titleView={nativeAdAssetRegistrations.titleView?.nativeTag ?? 0}
@@ -3,7 +3,7 @@ import type { ErrorCode } from '../ErrorCode';
3
3
  // Represents an ad
4
4
  export type AdInfo = {
5
5
  // The ad unit ID for which this ad was loaded.
6
- adUnitId: string;
6
+ adUnitKey: string;
7
7
  // The total latency in milliseconds for this waterfall to finish processing.
8
8
  latencyMillis: number;
9
9
 
@@ -28,7 +28,7 @@ export type AdInfo = {
28
28
  // Encapsulates various data for MAX load errors.
29
29
  export type AdLoadFailedInfo = {
30
30
  // The ad unit ID for which this ad was loaded.
31
- adUnitId: string;
31
+ adUnitKey: string;
32
32
 
33
33
  // The error code for the error.
34
34
  code: ErrorCode;
@@ -3,7 +3,7 @@ import type { AdLoadFailedInfo } from './AdInfo';
3
3
  import type { AdInfo } from './AdInfo';
4
4
 
5
5
  export type AdProps = {
6
- adUnitId: string;
6
+ adUnitKey: string;
7
7
 
8
8
  onAdLoaded?: (adInfo: AdInfo) => void;
9
9