@capacitor-community/admob 8.0.1 → 8.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.
Files changed (87) hide show
  1. package/CapacitorCommunityAdmob.podspec +1 -1
  2. package/Package.swift +1 -1
  3. package/README.md +470 -186
  4. package/android/build.gradle +1 -1
  5. package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdManager.kt +7 -1
  6. package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdPlugin.kt +26 -8
  7. package/android/src/main/java/com/getcapacitor/community/admob/appopen/AppOpenAdPluginEvents.kt +1 -0
  8. package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerAdPluginEvents.kt +2 -1
  9. package/android/src/main/java/com/getcapacitor/community/admob/banner/BannerExecutor.java +79 -29
  10. package/android/src/main/java/com/getcapacitor/community/admob/helpers/FullscreenPluginCallback.kt +7 -2
  11. package/android/src/main/java/com/getcapacitor/community/admob/interstitial/AdInterstitialExecutor.java +21 -3
  12. package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdCallbackAndListeners.kt +12 -2
  13. package/android/src/main/java/com/getcapacitor/community/admob/interstitial/InterstitialAdPluginPluginEvent.kt +1 -0
  14. package/android/src/main/java/com/getcapacitor/community/admob/models/AdMobRevenueData.kt +15 -0
  15. package/android/src/main/java/com/getcapacitor/community/admob/rewarded/AdRewardExecutor.java +20 -3
  16. package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardAdPluginEvents.kt +1 -0
  17. package/android/src/main/java/com/getcapacitor/community/admob/rewarded/RewardedAdCallbackAndListeners.kt +14 -4
  18. package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/AdRewardInterstitialExecutor.java +20 -3
  19. package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardInterstitialAdPluginEvents.kt +1 -0
  20. package/android/src/main/java/com/getcapacitor/community/admob/rewardedinterstitial/RewardedInterstitialAdCallbackAndListeners.kt +14 -3
  21. package/dist/docs.json +511 -178
  22. package/dist/esm/app-open/app-open-ad-options.interface.d.ts +6 -0
  23. package/dist/esm/app-open/app-open-ad-plugin-events.enum.d.ts +20 -1
  24. package/dist/esm/app-open/app-open-ad-plugin-events.enum.js +19 -0
  25. package/dist/esm/app-open/app-open-ad-plugin-events.enum.js.map +1 -1
  26. package/dist/esm/app-open/app-open-definitions.interface.d.ts +31 -8
  27. package/dist/esm/banner/banner-ad-options.interface.d.ts +5 -6
  28. package/dist/esm/banner/banner-ad-plugin-events.enum.d.ts +17 -4
  29. package/dist/esm/banner/banner-ad-plugin-events.enum.js +16 -3
  30. package/dist/esm/banner/banner-ad-plugin-events.enum.js.map +1 -1
  31. package/dist/esm/banner/banner-ad-position.enum.d.ts +3 -3
  32. package/dist/esm/banner/banner-ad-position.enum.js +3 -3
  33. package/dist/esm/banner/banner-ad-size.enum.d.ts +4 -3
  34. package/dist/esm/banner/banner-ad-size.enum.js +4 -3
  35. package/dist/esm/banner/banner-ad-size.enum.js.map +1 -1
  36. package/dist/esm/banner/banner-definitions.interface.d.ts +17 -10
  37. package/dist/esm/banner/banner-size.interface.d.ts +8 -1
  38. package/dist/esm/definitions.d.ts +17 -16
  39. package/dist/esm/definitions.js.map +1 -1
  40. package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.d.ts +10 -6
  41. package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.js +9 -5
  42. package/dist/esm/interstitial/interstitial-ad-plugin-events.enum.js.map +1 -1
  43. package/dist/esm/interstitial/interstitial-definitions.interface.d.ts +24 -4
  44. package/dist/esm/reward/reward-ad-options.interface.d.ts +7 -6
  45. package/dist/esm/reward/reward-ad-plugin-events.enum.d.ts +13 -12
  46. package/dist/esm/reward/reward-ad-plugin-events.enum.js +12 -11
  47. package/dist/esm/reward/reward-ad-plugin-events.enum.js.map +1 -1
  48. package/dist/esm/reward/reward-definitions.interface.d.ts +27 -4
  49. package/dist/esm/reward/reward-item.interface.d.ts +3 -4
  50. package/dist/esm/reward-interstitial/reward-interstitial-ad-options.interface.d.ts +7 -6
  51. package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.d.ts +13 -12
  52. package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js +12 -11
  53. package/dist/esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js.map +1 -1
  54. package/dist/esm/reward-interstitial/reward-interstitial-definitions.interface.d.ts +30 -7
  55. package/dist/esm/reward-interstitial/reward-interstitial-item.interface.d.ts +3 -4
  56. package/dist/esm/shared/ad-load-info.interface.d.ts +6 -0
  57. package/dist/esm/shared/ad-mob-revenue-data.interface.d.ts +50 -0
  58. package/dist/esm/shared/ad-mob-revenue-data.interface.js +23 -0
  59. package/dist/esm/shared/ad-mob-revenue-data.interface.js.map +1 -0
  60. package/dist/esm/shared/ad-options.interface.d.ts +9 -11
  61. package/dist/esm/shared/ad-show-options.interface.d.ts +12 -0
  62. package/dist/esm/shared/ad-show-options.interface.js +2 -0
  63. package/dist/esm/shared/ad-show-options.interface.js.map +1 -0
  64. package/dist/esm/shared/admob-error.interface.d.ts +3 -2
  65. package/dist/esm/shared/index.d.ts +2 -0
  66. package/dist/esm/shared/index.js +2 -0
  67. package/dist/esm/shared/index.js.map +1 -1
  68. package/dist/esm/shared/tracking-authorization-status.interface.d.ts +6 -1
  69. package/dist/esm/web.d.ts +6 -6
  70. package/dist/esm/web.js +11 -6
  71. package/dist/esm/web.js.map +1 -1
  72. package/dist/plugin.cjs.js +109 -42
  73. package/dist/plugin.cjs.js.map +1 -1
  74. package/dist/plugin.js +109 -42
  75. package/dist/plugin.js.map +1 -1
  76. package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdManager.swift +12 -1
  77. package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdPlugin.swift +40 -10
  78. package/ios/Sources/AdMobPlugin/AppOpen/AppOpenAdPluginEvents.swift +1 -0
  79. package/ios/Sources/AdMobPlugin/Banner/BannerAdPluginEvents.swift +1 -0
  80. package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +14 -0
  81. package/ios/Sources/AdMobPlugin/Interstitial/AdInterstitialExecutor.swift +41 -5
  82. package/ios/Sources/AdMobPlugin/Interstitial/InterstitialAdPluginEvents.swift +1 -0
  83. package/ios/Sources/AdMobPlugin/Rewarded/AdRewardExecutor.swift +44 -5
  84. package/ios/Sources/AdMobPlugin/Rewarded/RewardAdPluginEvents.swift +1 -0
  85. package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +45 -6
  86. package/ios/Sources/AdMobPlugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +1 -0
  87. package/package.json +1 -1
package/dist/plugin.js CHANGED
@@ -24,21 +24,34 @@ var capacitorStripe = (function (exports, core) {
24
24
  // This enum should be keep in sync with their native equivalents with the same name
25
25
  exports.BannerAdPluginEvents = void 0;
26
26
  (function (BannerAdPluginEvents) {
27
+ /**
28
+ * Emits when the displayed banner size changes.
29
+ */
27
30
  BannerAdPluginEvents["SizeChanged"] = "bannerAdSizeChanged";
31
+ /**
32
+ * Emits when a banner ad has loaded.
33
+ */
28
34
  BannerAdPluginEvents["Loaded"] = "bannerAdLoaded";
35
+ /**
36
+ * Emits when a banner ad fails to load.
37
+ */
29
38
  BannerAdPluginEvents["FailedToLoad"] = "bannerAdFailedToLoad";
30
39
  /**
31
- * Open "Adsense" Event after user click banner
40
+ * Emits when a banner opens an overlay after the user taps it.
32
41
  */
33
42
  BannerAdPluginEvents["Opened"] = "bannerAdOpened";
34
43
  /**
35
- * Close "Adsense" Event after user click banner
44
+ * Emits when the banner overlay is closed.
36
45
  */
37
46
  BannerAdPluginEvents["Closed"] = "bannerAdClosed";
38
47
  /**
39
- * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.
48
+ * Emits when an impression is recorded for the banner ad.
40
49
  */
41
50
  BannerAdPluginEvents["AdImpression"] = "bannerAdImpression";
51
+ /**
52
+ * Emits impression-level ad revenue data when a paid event is recorded.
53
+ */
54
+ BannerAdPluginEvents["AdPaid"] = "bannerAdPaid";
42
55
  })(exports.BannerAdPluginEvents || (exports.BannerAdPluginEvents = {}));
43
56
 
44
57
  /**
@@ -47,15 +60,15 @@ var capacitorStripe = (function (exports, core) {
47
60
  exports.BannerAdPosition = void 0;
48
61
  (function (BannerAdPosition) {
49
62
  /**
50
- * Banner position be top-center
63
+ * Positions the banner at the top center of the screen.
51
64
  */
52
65
  BannerAdPosition["TOP_CENTER"] = "TOP_CENTER";
53
66
  /**
54
- * Banner position be center
67
+ * Positions the banner at the center of the screen.
55
68
  */
56
69
  BannerAdPosition["CENTER"] = "CENTER";
57
70
  /**
58
- * Banner position be bottom-center(default)
71
+ * Positions the banner at the bottom center of the screen.
59
72
  */
60
73
  BannerAdPosition["BOTTOM_CENTER"] = "BOTTOM_CENTER";
61
74
  })(exports.BannerAdPosition || (exports.BannerAdPosition = {}));
@@ -97,9 +110,10 @@ var capacitorStripe = (function (exports, core) {
97
110
  */
98
111
  BannerAdSize["ADAPTIVE_BANNER"] = "ADAPTIVE_BANNER";
99
112
  /**
100
- * @deprecated
101
- * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`
102
- * Screen width x 32|50|90
113
+ * A legacy smart banner sized to the screen width.
114
+ * Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.
115
+ *
116
+ * @deprecated Use `ADAPTIVE_BANNER` instead.
103
117
  */
104
118
  BannerAdSize["SMART_BANNER"] = "SMART_BANNER";
105
119
  })(exports.BannerAdSize || (exports.BannerAdSize = {}));
@@ -108,95 +122,101 @@ var capacitorStripe = (function (exports, core) {
108
122
  exports.InterstitialAdPluginEvents = void 0;
109
123
  (function (InterstitialAdPluginEvents) {
110
124
  /**
111
- * Emits after trying to prepare and Interstitial, when it is loaded and ready to be show
125
+ * Emits when an interstitial ad has loaded and is ready to show.
112
126
  */
113
127
  InterstitialAdPluginEvents["Loaded"] = "interstitialAdLoaded";
114
128
  /**
115
- * Emits after trying to prepare and Interstitial, when it could not be loaded
129
+ * Emits when an interstitial ad fails to load.
116
130
  */
117
131
  InterstitialAdPluginEvents["FailedToLoad"] = "interstitialAdFailedToLoad";
118
132
  /**
119
- * Emits when the Interstitial ad is visible to the user
133
+ * Emits when an interstitial ad is shown.
120
134
  */
121
135
  InterstitialAdPluginEvents["Showed"] = "interstitialAdShowed";
122
136
  /**
123
- * Emits when the Interstitial ad is failed to show
137
+ * Emits when a loaded interstitial ad fails to show.
124
138
  */
125
139
  InterstitialAdPluginEvents["FailedToShow"] = "interstitialAdFailedToShow";
126
140
  /**
127
- * Emits when the Interstitial ad is not visible to the user anymore.
141
+ * Emits when an interstitial ad is dismissed.
128
142
  */
129
143
  InterstitialAdPluginEvents["Dismissed"] = "interstitialAdDismissed";
144
+ /**
145
+ * Emits impression-level ad revenue data when a paid event is recorded.
146
+ */
147
+ InterstitialAdPluginEvents["AdImpression"] = "interstitialAdImpression";
130
148
  })(exports.InterstitialAdPluginEvents || (exports.InterstitialAdPluginEvents = {}));
131
149
 
132
150
  // This enum should be keep in sync with their native equivalents with the same name
133
151
  exports.RewardInterstitialAdPluginEvents = void 0;
134
152
  (function (RewardInterstitialAdPluginEvents) {
135
153
  /**
136
- * Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show
154
+ * Emits when a rewarded interstitial ad has loaded and is ready to show.
137
155
  */
138
156
  RewardInterstitialAdPluginEvents["Loaded"] = "onRewardedInterstitialAdLoaded";
139
157
  /**
140
- * Emits after trying to prepare a RewardAd when it could not be loaded
158
+ * Emits when a rewarded interstitial ad fails to load.
141
159
  */
142
160
  RewardInterstitialAdPluginEvents["FailedToLoad"] = "onRewardedInterstitialAdFailedToLoad";
143
161
  /**
144
- * Emits when the AdReward video is visible to the user
162
+ * Emits when a rewarded interstitial ad is shown.
145
163
  */
146
164
  RewardInterstitialAdPluginEvents["Showed"] = "onRewardedInterstitialAdShowed";
147
165
  /**
148
- * Emits when the AdReward video is failed to show
166
+ * Emits when a loaded rewarded interstitial ad fails to show.
149
167
  */
150
168
  RewardInterstitialAdPluginEvents["FailedToShow"] = "onRewardedInterstitialAdFailedToShow";
151
169
  /**
152
- * Emits when the AdReward video is not visible to the user anymore.
170
+ * Emits when a rewarded interstitial ad is dismissed.
153
171
  *
154
- * **Important**: This has nothing to do with the reward it self. This event
155
- * will emits in this two cases:
156
- * 1. The user starts the video ad but close it before the reward emit.
157
- * 2. The user start the video and see it until end, then gets the reward
158
- * and after that the ad is closed.
172
+ * This event does not indicate whether the user earned a reward. Listen for
173
+ * `Rewarded` separately before granting the reward.
159
174
  */
160
175
  RewardInterstitialAdPluginEvents["Dismissed"] = "onRewardedInterstitialAdDismissed";
161
176
  /**
162
- * Emits when user get rewarded from AdReward
177
+ * Emits when the user earns the advertised reward.
163
178
  */
164
179
  RewardInterstitialAdPluginEvents["Rewarded"] = "onRewardedInterstitialAdReward";
180
+ /**
181
+ * Emits impression-level ad revenue data when a paid event is recorded.
182
+ */
183
+ RewardInterstitialAdPluginEvents["AdImpression"] = "onRewardedInterstitialAdImpression";
165
184
  })(exports.RewardInterstitialAdPluginEvents || (exports.RewardInterstitialAdPluginEvents = {}));
166
185
 
167
186
  // This enum should be keep in sync with their native equivalents with the same name
168
187
  exports.RewardAdPluginEvents = void 0;
169
188
  (function (RewardAdPluginEvents) {
170
189
  /**
171
- * Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show
190
+ * Emits when a rewarded ad has loaded and is ready to show.
172
191
  */
173
192
  RewardAdPluginEvents["Loaded"] = "onRewardedVideoAdLoaded";
174
193
  /**
175
- * Emits after trying to prepare a RewardAd when it could not be loaded
194
+ * Emits when a rewarded ad fails to load.
176
195
  */
177
196
  RewardAdPluginEvents["FailedToLoad"] = "onRewardedVideoAdFailedToLoad";
178
197
  /**
179
- * Emits when the AdReward video is visible to the user
198
+ * Emits when a rewarded ad is shown.
180
199
  */
181
200
  RewardAdPluginEvents["Showed"] = "onRewardedVideoAdShowed";
182
201
  /**
183
- * Emits when the AdReward video is failed to show
202
+ * Emits when a loaded rewarded ad fails to show.
184
203
  */
185
204
  RewardAdPluginEvents["FailedToShow"] = "onRewardedVideoAdFailedToShow";
186
205
  /**
187
- * Emits when the AdReward video is not visible to the user anymore.
206
+ * Emits when a rewarded ad is dismissed.
188
207
  *
189
- * **Important**: This has nothing to do with the reward it self. This event
190
- * will emits in this two cases:
191
- * 1. The user starts the video ad but close it before the reward emit.
192
- * 2. The user start the video and see it until end, then gets the reward
193
- * and after that the ad is closed.
208
+ * This event does not indicate whether the user earned a reward. Listen for
209
+ * `Rewarded` separately before granting the reward.
194
210
  */
195
211
  RewardAdPluginEvents["Dismissed"] = "onRewardedVideoAdDismissed";
196
212
  /**
197
- * Emits when user get rewarded from AdReward
213
+ * Emits when the user earns the advertised reward.
198
214
  */
199
215
  RewardAdPluginEvents["Rewarded"] = "onRewardedVideoAdReward";
216
+ /**
217
+ * Emits impression-level ad revenue data when a paid event is recorded.
218
+ */
219
+ RewardAdPluginEvents["AdImpression"] = "onRewardedVideoAdImpression";
200
220
  })(exports.RewardAdPluginEvents || (exports.RewardAdPluginEvents = {}));
201
221
 
202
222
  /**
@@ -254,13 +274,55 @@ var capacitorStripe = (function (exports, core) {
254
274
  AdmobConsentDebugGeography[AdmobConsentDebugGeography["OTHER"] = 4] = "OTHER";
255
275
  })(exports.AdmobConsentDebugGeography || (exports.AdmobConsentDebugGeography = {}));
256
276
 
277
+ /**
278
+ * The precision of an impression-level ad value.
279
+ */
280
+ exports.AdValuePrecision = void 0;
281
+ (function (AdValuePrecision) {
282
+ /**
283
+ * The ad value precision is unknown.
284
+ */
285
+ AdValuePrecision[AdValuePrecision["Unknown"] = 0] = "Unknown";
286
+ /**
287
+ * The ad value is estimated from aggregated data.
288
+ */
289
+ AdValuePrecision[AdValuePrecision["Estimated"] = 1] = "Estimated";
290
+ /**
291
+ * The ad value was provided by the publisher.
292
+ */
293
+ AdValuePrecision[AdValuePrecision["PublisherProvided"] = 2] = "PublisherProvided";
294
+ /**
295
+ * The ad value is the precise value paid for this ad.
296
+ */
297
+ AdValuePrecision[AdValuePrecision["Precise"] = 3] = "Precise";
298
+ })(exports.AdValuePrecision || (exports.AdValuePrecision = {}));
299
+
257
300
  exports.AppOpenAdPluginEvents = void 0;
258
301
  (function (AppOpenAdPluginEvents) {
302
+ /**
303
+ * Emits when an App Open ad has loaded.
304
+ */
259
305
  AppOpenAdPluginEvents["Loaded"] = "appOpenAdLoaded";
306
+ /**
307
+ * Emits when an App Open ad fails to load.
308
+ */
260
309
  AppOpenAdPluginEvents["FailedToLoad"] = "appOpenAdFailedToLoad";
310
+ /**
311
+ * Emits when an App Open ad is shown.
312
+ */
261
313
  AppOpenAdPluginEvents["Opened"] = "appOpenAdOpened";
314
+ /**
315
+ * Emits when an App Open ad is dismissed.
316
+ */
262
317
  AppOpenAdPluginEvents["Closed"] = "appOpenAdClosed";
318
+ /**
319
+ * Emits when a loaded App Open ad fails to show.
320
+ */
263
321
  AppOpenAdPluginEvents["FailedToShow"] = "appOpenAdFailedToShow";
322
+ /**
323
+ * Emits impression-level ad revenue data when a paid event is recorded.
324
+ */
325
+ AppOpenAdPluginEvents["AdImpression"] = "appOpenAdImpression";
264
326
  })(exports.AppOpenAdPluginEvents || (exports.AppOpenAdPluginEvents = {}));
265
327
 
266
328
  const AdMob = core.registerPlugin('AdMob', {
@@ -347,8 +409,8 @@ var capacitorStripe = (function (exports, core) {
347
409
  adUnitId: options.adId,
348
410
  };
349
411
  }
350
- async showInterstitial() {
351
- console.log('showInterstitial');
412
+ async showInterstitial(options) {
413
+ console.log('showInterstitial', options);
352
414
  }
353
415
  async prepareRewardVideoAd(options) {
354
416
  console.log('prepareRewardVideoAd', options);
@@ -356,7 +418,8 @@ var capacitorStripe = (function (exports, core) {
356
418
  adUnitId: options.adId,
357
419
  };
358
420
  }
359
- async showRewardVideoAd() {
421
+ async showRewardVideoAd(options) {
422
+ console.log('showRewardVideoAd', options);
360
423
  return {
361
424
  type: '',
362
425
  amount: 0,
@@ -368,7 +431,8 @@ var capacitorStripe = (function (exports, core) {
368
431
  adUnitId: options.adId,
369
432
  };
370
433
  }
371
- async showRewardInterstitialAd() {
434
+ async showRewardInterstitialAd(options) {
435
+ console.log('showRewardInterstitialAd', options);
372
436
  return {
373
437
  type: '',
374
438
  amount: 0,
@@ -376,9 +440,12 @@ var capacitorStripe = (function (exports, core) {
376
440
  }
377
441
  async loadAppOpen(options) {
378
442
  console.log('loadAppOpen', options);
443
+ return {
444
+ adUnitId: options.adId,
445
+ };
379
446
  }
380
- async showAppOpen() {
381
- console.log('showAppOpen');
447
+ async showAppOpen(options) {
448
+ console.log('showAppOpen', options);
382
449
  }
383
450
  async isAppOpenLoaded() {
384
451
  return { value: false };
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/banner/banner-ad-plugin-events.enum.js","esm/banner/banner-ad-position.enum.js","esm/banner/banner-ad-size.enum.js","esm/interstitial/interstitial-ad-plugin-events.enum.js","esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js","esm/reward/reward-ad-plugin-events.enum.js","esm/consent/consent-status.enum.js","esm/consent/consent-debug-geography.enum.js","esm/app-open/app-open-ad-plugin-events.enum.js","esm/index.js","esm/consent/privacy-options-requirement-status.enum.js","esm/web.js"],"sourcesContent":["export var MaxAdContentRating;\n(function (MaxAdContentRating) {\n /**\n * Content suitable for general audiences, including families.\n */\n MaxAdContentRating[\"General\"] = \"General\";\n /**\n * Content suitable for most audiences with parental guidance.\n */\n MaxAdContentRating[\"ParentalGuidance\"] = \"ParentalGuidance\";\n /**\n * Content suitable for teen and older audiences.\n */\n MaxAdContentRating[\"Teen\"] = \"Teen\";\n /**\n * Content suitable only for mature audiences.\n */\n MaxAdContentRating[\"MatureAudience\"] = \"MatureAudience\";\n})(MaxAdContentRating || (MaxAdContentRating = {}));\n//# sourceMappingURL=definitions.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var BannerAdPluginEvents;\n(function (BannerAdPluginEvents) {\n BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Open \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Close \"Adsense\" Event after user click banner\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Similarly, this method should be called when an impression is recorded for the ad by the mediated SDK.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\n})(BannerAdPluginEvents || (BannerAdPluginEvents = {}));\n//# sourceMappingURL=banner-ad-plugin-events.enum.js.map","/**\n * @see https://developer.android.com/reference/android/widget/LinearLayout#attr_android:gravity\n */\nexport var BannerAdPosition;\n(function (BannerAdPosition) {\n /**\n * Banner position be top-center\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Banner position be center\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Banner position be bottom-center(default)\n */\n BannerAdPosition[\"BOTTOM_CENTER\"] = \"BOTTOM_CENTER\";\n})(BannerAdPosition || (BannerAdPosition = {}));\n//# sourceMappingURL=banner-ad-position.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/ios/banner#banner_sizes\n * https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize\n *\n * */\nexport var BannerAdSize;\n(function (BannerAdSize) {\n /**\n * Mobile Marketing Association (MMA)\n * banner ad size (320x50 density-independent pixels).\n */\n BannerAdSize[\"BANNER\"] = \"BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * full banner ad size (468x60 density-independent pixels).\n */\n BannerAdSize[\"FULL_BANNER\"] = \"FULL_BANNER\";\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n BannerAdSize[\"LARGE_BANNER\"] = \"LARGE_BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * medium rectangle ad size (300x250 density-independent pixels).\n */\n BannerAdSize[\"MEDIUM_RECTANGLE\"] = \"MEDIUM_RECTANGLE\";\n /**\n * Interactive Advertising Bureau (IAB)\n * leaderboard ad size (728x90 density-independent pixels).\n */\n BannerAdSize[\"LEADERBOARD\"] = \"LEADERBOARD\";\n /**\n * A dynamically sized banner that is full-width and auto-height.\n */\n BannerAdSize[\"ADAPTIVE_BANNER\"] = \"ADAPTIVE_BANNER\";\n /**\n * @deprecated\n * Will be removed in next AdMob versions use `ADAPTIVE_BANNER`\n * Screen width x 32|50|90\n */\n BannerAdSize[\"SMART_BANNER\"] = \"SMART_BANNER\";\n})(BannerAdSize || (BannerAdSize = {}));\n//# sourceMappingURL=banner-ad-size.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var InterstitialAdPluginEvents;\n(function (InterstitialAdPluginEvents) {\n /**\n * Emits after trying to prepare and Interstitial, when it is loaded and ready to be show\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits after trying to prepare and Interstitial, when it could not be loaded\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when the Interstitial ad is visible to the user\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when the Interstitial ad is failed to show\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when the Interstitial ad is not visible to the user anymore.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\n})(InterstitialAdPluginEvents || (InterstitialAdPluginEvents = {}));\n//# sourceMappingURL=interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardInterstitialAdPluginEvents;\n(function (RewardInterstitialAdPluginEvents) {\n /**\n * Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\n})(RewardInterstitialAdPluginEvents || (RewardInterstitialAdPluginEvents = {}));\n//# sourceMappingURL=reward-interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardAdPluginEvents;\n(function (RewardAdPluginEvents) {\n /**\n * Emits after trying to prepare a RewardAd and the Video is loaded and ready to be show\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits after trying to prepare a RewardAd when it could not be loaded\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when the AdReward video is visible to the user\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when the AdReward video is failed to show\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when the AdReward video is not visible to the user anymore.\n *\n * **Important**: This has nothing to do with the reward it self. This event\n * will emits in this two cases:\n * 1. The user starts the video ad but close it before the reward emit.\n * 2. The user start the video and see it until end, then gets the reward\n * and after that the ad is closed.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when user get rewarded from AdReward\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\n})(RewardAdPluginEvents || (RewardAdPluginEvents = {}));\n//# sourceMappingURL=reward-ad-plugin-events.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#consentstatus\n *\n * */\nexport var AdmobConsentStatus;\n(function (AdmobConsentStatus) {\n /**\n * User consent not required.\n */\n AdmobConsentStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * User consent already obtained.\n */\n AdmobConsentStatus[\"OBTAINED\"] = \"OBTAINED\";\n /**\n * User consent required but not yet obtained.\n */\n AdmobConsentStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n AdmobConsentStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(AdmobConsentStatus || (AdmobConsentStatus = {}));\n//# sourceMappingURL=consent-status.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#debuggeography\n *\n * */\nexport var AdmobConsentDebugGeography;\n(function (AdmobConsentDebugGeography) {\n /**\n * Debug geography disabled.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"DISABLED\"] = 0] = \"DISABLED\";\n /**\n * Geography appears as in EEA for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"EEA\"] = 1] = \"EEA\";\n /**\n * Geography appears as not in EEA for debug devices.\n * @deprecated\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n /**\n * Geography appears as in regulated US state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"US\"] = 3] = \"US\";\n /**\n * Geography appears as OTHER state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"OTHER\"] = 4] = \"OTHER\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.enum.js.map","export var AppOpenAdPluginEvents;\n(function (AppOpenAdPluginEvents) {\n AppOpenAdPluginEvents[\"Loaded\"] = \"appOpenAdLoaded\";\n AppOpenAdPluginEvents[\"FailedToLoad\"] = \"appOpenAdFailedToLoad\";\n AppOpenAdPluginEvents[\"Opened\"] = \"appOpenAdOpened\";\n AppOpenAdPluginEvents[\"Closed\"] = \"appOpenAdClosed\";\n AppOpenAdPluginEvents[\"FailedToShow\"] = \"appOpenAdFailedToShow\";\n})(AppOpenAdPluginEvents || (AppOpenAdPluginEvents = {}));\n//# sourceMappingURL=app-open-ad-plugin-events.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst AdMob = registerPlugin('AdMob', {\n web: () => import('./web').then((m) => new m.AdMobWeb()),\n});\nexport * from './definitions';\nexport * from './banner/index';\nexport * from './interstitial/index';\nexport * from './reward-interstitial/index';\nexport * from './reward/index';\nexport * from './consent/index';\nexport * from './shared/index';\nexport * from './app-open/index';\nexport { AdMob };\n//# sourceMappingURL=index.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus\n *\n * */\nexport var PrivacyOptionsRequirementStatus;\n(function (PrivacyOptionsRequirementStatus) {\n /**\n * Privacy options entry point is not required.\n */\n PrivacyOptionsRequirementStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * Privacy options entry point is required.\n */\n PrivacyOptionsRequirementStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Privacy options requirement status is unknown.\n */\n PrivacyOptionsRequirementStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));\n//# sourceMappingURL=privacy-options-requirement-status.enum.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-status.enum';\nimport { PrivacyOptionsRequirementStatus } from './consent/privacy-options-requirement-status.enum';\nexport class AdMobWeb extends WebPlugin {\n async initialize() {\n console.log('initialize');\n }\n async requestTrackingAuthorization() {\n console.log('requestTrackingAuthorization');\n }\n async trackingAuthorizationStatus() {\n return {\n status: 'authorized',\n };\n }\n async requestConsentInfo(options) {\n console.log('requestConsentInfo', options);\n return {\n status: AdmobConsentStatus.REQUIRED,\n isConsentFormAvailable: true,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async showPrivacyOptionsForm() {\n console.log('showPrivacyOptionsForm');\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.REQUIRED,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async resetConsentInfo() {\n console.log('resetConsentInfo');\n }\n async setApplicationMuted(options) {\n console.log('setApplicationMuted', options);\n }\n async setApplicationVolume(options) {\n console.log('setApplicationVolume', options);\n }\n async showBanner(options) {\n console.log('showBanner', options);\n }\n async hideBanner() {\n console.log('hideBanner');\n }\n async resumeBanner() {\n console.log('resumeBanner');\n }\n async removeBanner() {\n console.log('removeBanner');\n }\n async prepareInterstitial(options) {\n console.log('prepareInterstitial', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showInterstitial() {\n console.log('showInterstitial');\n }\n async prepareRewardVideoAd(options) {\n console.log('prepareRewardVideoAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log('prepareRewardInterstitialAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n async loadAppOpen(options) {\n console.log('loadAppOpen', options);\n }\n async showAppOpen() {\n console.log('showAppOpen');\n }\n async isAppOpenLoaded() {\n return { value: false };\n }\n addListener(eventName, listenerFunc) {\n void listenerFunc;\n console.log('addListener', eventName);\n return Promise.resolve({ remove: () => Promise.resolve() });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","AppOpenAdPluginEvents","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC7C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IAC/D;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM;IACvC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAC3D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC;IACX,CAAC,UAAU,oBAAoB,EAAE;IACjC,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB;IAC/D,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB;IACjE;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAoB;IAC/D,CAAC,EAAEA,4BAAoB,KAAKA,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K,EAAE,KAAK,EAAE;IAC/B,IAAI;IACJ,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE;IAEzC,QAAQ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC;IAC7C,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;IACnE,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/banner/banner-ad-plugin-events.enum.js","esm/banner/banner-ad-position.enum.js","esm/banner/banner-ad-size.enum.js","esm/interstitial/interstitial-ad-plugin-events.enum.js","esm/reward-interstitial/reward-interstitial-ad-plugin-events.enum.js","esm/reward/reward-ad-plugin-events.enum.js","esm/consent/consent-status.enum.js","esm/consent/consent-debug-geography.enum.js","esm/shared/ad-mob-revenue-data.interface.js","esm/app-open/app-open-ad-plugin-events.enum.js","esm/index.js","esm/consent/privacy-options-requirement-status.enum.js","esm/web.js"],"sourcesContent":["export var MaxAdContentRating;\n(function (MaxAdContentRating) {\n /**\n * Content suitable for general audiences, including families.\n */\n MaxAdContentRating[\"General\"] = \"General\";\n /**\n * Content suitable for most audiences with parental guidance.\n */\n MaxAdContentRating[\"ParentalGuidance\"] = \"ParentalGuidance\";\n /**\n * Content suitable for teen and older audiences.\n */\n MaxAdContentRating[\"Teen\"] = \"Teen\";\n /**\n * Content suitable only for mature audiences.\n */\n MaxAdContentRating[\"MatureAudience\"] = \"MatureAudience\";\n})(MaxAdContentRating || (MaxAdContentRating = {}));\n//# sourceMappingURL=definitions.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var BannerAdPluginEvents;\n(function (BannerAdPluginEvents) {\n /**\n * Emits when the displayed banner size changes.\n */\n BannerAdPluginEvents[\"SizeChanged\"] = \"bannerAdSizeChanged\";\n /**\n * Emits when a banner ad has loaded.\n */\n BannerAdPluginEvents[\"Loaded\"] = \"bannerAdLoaded\";\n /**\n * Emits when a banner ad fails to load.\n */\n BannerAdPluginEvents[\"FailedToLoad\"] = \"bannerAdFailedToLoad\";\n /**\n * Emits when a banner opens an overlay after the user taps it.\n */\n BannerAdPluginEvents[\"Opened\"] = \"bannerAdOpened\";\n /**\n * Emits when the banner overlay is closed.\n */\n BannerAdPluginEvents[\"Closed\"] = \"bannerAdClosed\";\n /**\n * Emits when an impression is recorded for the banner ad.\n */\n BannerAdPluginEvents[\"AdImpression\"] = \"bannerAdImpression\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n BannerAdPluginEvents[\"AdPaid\"] = \"bannerAdPaid\";\n})(BannerAdPluginEvents || (BannerAdPluginEvents = {}));\n//# sourceMappingURL=banner-ad-plugin-events.enum.js.map","/**\n * @see https://developer.android.com/reference/android/widget/LinearLayout#attr_android:gravity\n */\nexport var BannerAdPosition;\n(function (BannerAdPosition) {\n /**\n * Positions the banner at the top center of the screen.\n */\n BannerAdPosition[\"TOP_CENTER\"] = \"TOP_CENTER\";\n /**\n * Positions the banner at the center of the screen.\n */\n BannerAdPosition[\"CENTER\"] = \"CENTER\";\n /**\n * Positions the banner at the bottom center of the screen.\n */\n BannerAdPosition[\"BOTTOM_CENTER\"] = \"BOTTOM_CENTER\";\n})(BannerAdPosition || (BannerAdPosition = {}));\n//# sourceMappingURL=banner-ad-position.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/ios/banner#banner_sizes\n * https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize\n *\n * */\nexport var BannerAdSize;\n(function (BannerAdSize) {\n /**\n * Mobile Marketing Association (MMA)\n * banner ad size (320x50 density-independent pixels).\n */\n BannerAdSize[\"BANNER\"] = \"BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * full banner ad size (468x60 density-independent pixels).\n */\n BannerAdSize[\"FULL_BANNER\"] = \"FULL_BANNER\";\n /**\n * Large banner ad size (320x100 density-independent pixels).\n */\n BannerAdSize[\"LARGE_BANNER\"] = \"LARGE_BANNER\";\n /**\n * Interactive Advertising Bureau (IAB)\n * medium rectangle ad size (300x250 density-independent pixels).\n */\n BannerAdSize[\"MEDIUM_RECTANGLE\"] = \"MEDIUM_RECTANGLE\";\n /**\n * Interactive Advertising Bureau (IAB)\n * leaderboard ad size (728x90 density-independent pixels).\n */\n BannerAdSize[\"LEADERBOARD\"] = \"LEADERBOARD\";\n /**\n * A dynamically sized banner that is full-width and auto-height.\n */\n BannerAdSize[\"ADAPTIVE_BANNER\"] = \"ADAPTIVE_BANNER\";\n /**\n * A legacy smart banner sized to the screen width.\n * Retained for compatibility; use `ADAPTIVE_BANNER` for new integrations.\n *\n * @deprecated Use `ADAPTIVE_BANNER` instead.\n */\n BannerAdSize[\"SMART_BANNER\"] = \"SMART_BANNER\";\n})(BannerAdSize || (BannerAdSize = {}));\n//# sourceMappingURL=banner-ad-size.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var InterstitialAdPluginEvents;\n(function (InterstitialAdPluginEvents) {\n /**\n * Emits when an interstitial ad has loaded and is ready to show.\n */\n InterstitialAdPluginEvents[\"Loaded\"] = \"interstitialAdLoaded\";\n /**\n * Emits when an interstitial ad fails to load.\n */\n InterstitialAdPluginEvents[\"FailedToLoad\"] = \"interstitialAdFailedToLoad\";\n /**\n * Emits when an interstitial ad is shown.\n */\n InterstitialAdPluginEvents[\"Showed\"] = \"interstitialAdShowed\";\n /**\n * Emits when a loaded interstitial ad fails to show.\n */\n InterstitialAdPluginEvents[\"FailedToShow\"] = \"interstitialAdFailedToShow\";\n /**\n * Emits when an interstitial ad is dismissed.\n */\n InterstitialAdPluginEvents[\"Dismissed\"] = \"interstitialAdDismissed\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n InterstitialAdPluginEvents[\"AdImpression\"] = \"interstitialAdImpression\";\n})(InterstitialAdPluginEvents || (InterstitialAdPluginEvents = {}));\n//# sourceMappingURL=interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardInterstitialAdPluginEvents;\n(function (RewardInterstitialAdPluginEvents) {\n /**\n * Emits when a rewarded interstitial ad has loaded and is ready to show.\n */\n RewardInterstitialAdPluginEvents[\"Loaded\"] = \"onRewardedInterstitialAdLoaded\";\n /**\n * Emits when a rewarded interstitial ad fails to load.\n */\n RewardInterstitialAdPluginEvents[\"FailedToLoad\"] = \"onRewardedInterstitialAdFailedToLoad\";\n /**\n * Emits when a rewarded interstitial ad is shown.\n */\n RewardInterstitialAdPluginEvents[\"Showed\"] = \"onRewardedInterstitialAdShowed\";\n /**\n * Emits when a loaded rewarded interstitial ad fails to show.\n */\n RewardInterstitialAdPluginEvents[\"FailedToShow\"] = \"onRewardedInterstitialAdFailedToShow\";\n /**\n * Emits when a rewarded interstitial ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardInterstitialAdPluginEvents[\"Dismissed\"] = \"onRewardedInterstitialAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardInterstitialAdPluginEvents[\"Rewarded\"] = \"onRewardedInterstitialAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardInterstitialAdPluginEvents[\"AdImpression\"] = \"onRewardedInterstitialAdImpression\";\n})(RewardInterstitialAdPluginEvents || (RewardInterstitialAdPluginEvents = {}));\n//# sourceMappingURL=reward-interstitial-ad-plugin-events.enum.js.map","// This enum should be keep in sync with their native equivalents with the same name\nexport var RewardAdPluginEvents;\n(function (RewardAdPluginEvents) {\n /**\n * Emits when a rewarded ad has loaded and is ready to show.\n */\n RewardAdPluginEvents[\"Loaded\"] = \"onRewardedVideoAdLoaded\";\n /**\n * Emits when a rewarded ad fails to load.\n */\n RewardAdPluginEvents[\"FailedToLoad\"] = \"onRewardedVideoAdFailedToLoad\";\n /**\n * Emits when a rewarded ad is shown.\n */\n RewardAdPluginEvents[\"Showed\"] = \"onRewardedVideoAdShowed\";\n /**\n * Emits when a loaded rewarded ad fails to show.\n */\n RewardAdPluginEvents[\"FailedToShow\"] = \"onRewardedVideoAdFailedToShow\";\n /**\n * Emits when a rewarded ad is dismissed.\n *\n * This event does not indicate whether the user earned a reward. Listen for\n * `Rewarded` separately before granting the reward.\n */\n RewardAdPluginEvents[\"Dismissed\"] = \"onRewardedVideoAdDismissed\";\n /**\n * Emits when the user earns the advertised reward.\n */\n RewardAdPluginEvents[\"Rewarded\"] = \"onRewardedVideoAdReward\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n RewardAdPluginEvents[\"AdImpression\"] = \"onRewardedVideoAdImpression\";\n})(RewardAdPluginEvents || (RewardAdPluginEvents = {}));\n//# sourceMappingURL=reward-ad-plugin-events.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#consentstatus\n *\n * */\nexport var AdmobConsentStatus;\n(function (AdmobConsentStatus) {\n /**\n * User consent not required.\n */\n AdmobConsentStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * User consent already obtained.\n */\n AdmobConsentStatus[\"OBTAINED\"] = \"OBTAINED\";\n /**\n * User consent required but not yet obtained.\n */\n AdmobConsentStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Unknown consent status, AdsConsent.requestInfoUpdate needs to be called to update it.\n */\n AdmobConsentStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(AdmobConsentStatus || (AdmobConsentStatus = {}));\n//# sourceMappingURL=consent-status.enum.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#debuggeography\n *\n * */\nexport var AdmobConsentDebugGeography;\n(function (AdmobConsentDebugGeography) {\n /**\n * Debug geography disabled.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"DISABLED\"] = 0] = \"DISABLED\";\n /**\n * Geography appears as in EEA for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"EEA\"] = 1] = \"EEA\";\n /**\n * Geography appears as not in EEA for debug devices.\n * @deprecated\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n /**\n * Geography appears as in regulated US state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"US\"] = 3] = \"US\";\n /**\n * Geography appears as OTHER state for debug devices.\n */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"OTHER\"] = 4] = \"OTHER\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.enum.js.map","/**\n * The precision of an impression-level ad value.\n */\nexport var AdValuePrecision;\n(function (AdValuePrecision) {\n /**\n * The ad value precision is unknown.\n */\n AdValuePrecision[AdValuePrecision[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * The ad value is estimated from aggregated data.\n */\n AdValuePrecision[AdValuePrecision[\"Estimated\"] = 1] = \"Estimated\";\n /**\n * The ad value was provided by the publisher.\n */\n AdValuePrecision[AdValuePrecision[\"PublisherProvided\"] = 2] = \"PublisherProvided\";\n /**\n * The ad value is the precise value paid for this ad.\n */\n AdValuePrecision[AdValuePrecision[\"Precise\"] = 3] = \"Precise\";\n})(AdValuePrecision || (AdValuePrecision = {}));\n//# sourceMappingURL=ad-mob-revenue-data.interface.js.map","export var AppOpenAdPluginEvents;\n(function (AppOpenAdPluginEvents) {\n /**\n * Emits when an App Open ad has loaded.\n */\n AppOpenAdPluginEvents[\"Loaded\"] = \"appOpenAdLoaded\";\n /**\n * Emits when an App Open ad fails to load.\n */\n AppOpenAdPluginEvents[\"FailedToLoad\"] = \"appOpenAdFailedToLoad\";\n /**\n * Emits when an App Open ad is shown.\n */\n AppOpenAdPluginEvents[\"Opened\"] = \"appOpenAdOpened\";\n /**\n * Emits when an App Open ad is dismissed.\n */\n AppOpenAdPluginEvents[\"Closed\"] = \"appOpenAdClosed\";\n /**\n * Emits when a loaded App Open ad fails to show.\n */\n AppOpenAdPluginEvents[\"FailedToShow\"] = \"appOpenAdFailedToShow\";\n /**\n * Emits impression-level ad revenue data when a paid event is recorded.\n */\n AppOpenAdPluginEvents[\"AdImpression\"] = \"appOpenAdImpression\";\n})(AppOpenAdPluginEvents || (AppOpenAdPluginEvents = {}));\n//# sourceMappingURL=app-open-ad-plugin-events.enum.js.map","import { registerPlugin } from '@capacitor/core';\nconst AdMob = registerPlugin('AdMob', {\n web: () => import('./web').then((m) => new m.AdMobWeb()),\n});\nexport * from './definitions';\nexport * from './banner/index';\nexport * from './interstitial/index';\nexport * from './reward-interstitial/index';\nexport * from './reward/index';\nexport * from './consent/index';\nexport * from './shared/index';\nexport * from './app-open/index';\nexport { AdMob };\n//# sourceMappingURL=index.js.map","/**\n * For more information:\n * https://developers.google.com/admob/unity/reference/namespace/google-mobile-ads/ump/api#privacyoptionsrequirementstatus\n *\n * */\nexport var PrivacyOptionsRequirementStatus;\n(function (PrivacyOptionsRequirementStatus) {\n /**\n * Privacy options entry point is not required.\n */\n PrivacyOptionsRequirementStatus[\"NOT_REQUIRED\"] = \"NOT_REQUIRED\";\n /**\n * Privacy options entry point is required.\n */\n PrivacyOptionsRequirementStatus[\"REQUIRED\"] = \"REQUIRED\";\n /**\n * Privacy options requirement status is unknown.\n */\n PrivacyOptionsRequirementStatus[\"UNKNOWN\"] = \"UNKNOWN\";\n})(PrivacyOptionsRequirementStatus || (PrivacyOptionsRequirementStatus = {}));\n//# sourceMappingURL=privacy-options-requirement-status.enum.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-status.enum';\nimport { PrivacyOptionsRequirementStatus } from './consent/privacy-options-requirement-status.enum';\nexport class AdMobWeb extends WebPlugin {\n async initialize() {\n console.log('initialize');\n }\n async requestTrackingAuthorization() {\n console.log('requestTrackingAuthorization');\n }\n async trackingAuthorizationStatus() {\n return {\n status: 'authorized',\n };\n }\n async requestConsentInfo(options) {\n console.log('requestConsentInfo', options);\n return {\n status: AdmobConsentStatus.REQUIRED,\n isConsentFormAvailable: true,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async showPrivacyOptionsForm() {\n console.log('showPrivacyOptionsForm');\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.REQUIRED,\n canRequestAds: true,\n privacyOptionsRequirementStatus: PrivacyOptionsRequirementStatus.REQUIRED,\n };\n }\n async resetConsentInfo() {\n console.log('resetConsentInfo');\n }\n async setApplicationMuted(options) {\n console.log('setApplicationMuted', options);\n }\n async setApplicationVolume(options) {\n console.log('setApplicationVolume', options);\n }\n async showBanner(options) {\n console.log('showBanner', options);\n }\n async hideBanner() {\n console.log('hideBanner');\n }\n async resumeBanner() {\n console.log('resumeBanner');\n }\n async removeBanner() {\n console.log('removeBanner');\n }\n async prepareInterstitial(options) {\n console.log('prepareInterstitial', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showInterstitial(options) {\n console.log('showInterstitial', options);\n }\n async prepareRewardVideoAd(options) {\n console.log('prepareRewardVideoAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardVideoAd(options) {\n console.log('showRewardVideoAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async prepareRewardInterstitialAd(options) {\n console.log('prepareRewardInterstitialAd', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd(options) {\n console.log('showRewardInterstitialAd', options);\n return {\n type: '',\n amount: 0,\n };\n }\n async loadAppOpen(options) {\n console.log('loadAppOpen', options);\n return {\n adUnitId: options.adId,\n };\n }\n async showAppOpen(options) {\n console.log('showAppOpen', options);\n }\n async isAppOpenLoaded() {\n return { value: false };\n }\n addListener(eventName, listenerFunc) {\n void listenerFunc;\n console.log('addListener', eventName);\n return Promise.resolve({ remove: () => Promise.resolve() });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","AdValuePrecision","AppOpenAdPluginEvents","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC7C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;IAC/D;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM;IACvC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;IAC3D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC;IACX,CAAC,UAAU,oBAAoB,EAAE;IACjC;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB;IAC/D;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB;IACjE;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;IACrD;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAoB;IAC/D;IACA;IACA;IACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,cAAc;IACnD,CAAC,EAAEA,4BAAoB,KAAKA,4BAAoB,GAAG,EAAE,CAAC,CAAC;;IC/BvD;IACA;IACA;AACWC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7B;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;IACjD;IACA;IACA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 -13,7 +13,7 @@ import UIKit
13
13
  self.adUnitId = adUnitId
14
14
  }
15
15
 
16
- public func loadAd(onLoaded: @escaping () -> Void, onFailed: @escaping (Error?) -> Void) {
16
+ public func loadAd(onLoaded: @escaping () -> Void, onFailed: @escaping (Error?) -> Void, onPaidEvent: @escaping (_ valueMicros: Int64, _ currencyCode: String, _ precision: Int, _ networkName: String, _ impressionId: String) -> Void) {
17
17
  if appOpenAd != nil {
18
18
  onLoaded()
19
19
  return
@@ -34,6 +34,17 @@ import UIKit
34
34
  await MainActor.run {
35
35
  self.isLoadingAd = false
36
36
  self.appOpenAd = ad
37
+ ad.paidEventHandler = { adValue in
38
+ let networkName = ad.responseInfo.loadedAdNetworkResponseInfo?.adNetworkClassName ?? ""
39
+ let impressionId = ad.responseInfo.responseIdentifier ?? ""
40
+ onPaidEvent(
41
+ adValue.value.int64Value,
42
+ adValue.currencyCode,
43
+ adValue.precision.rawValue,
44
+ networkName,
45
+ impressionId
46
+ )
47
+ }
37
48
  onLoaded()
38
49
  }
39
50
  } catch {
@@ -3,8 +3,8 @@ import Capacitor
3
3
  import UIKit
4
4
 
5
5
  @objc public class AppOpenAdPlugin: NSObject {
6
- private var appOpenAdManager: AppOpenAdManager?
7
- private var currentAdUnitId: String?
6
+ private var preparedManagers: [String: AppOpenAdManager] = [:]
7
+ private var lastPreparedAdId: String?
8
8
 
9
9
  @objc func loadAppOpen(
10
10
  _ call: CAPPluginCall,
@@ -14,12 +14,14 @@ import UIKit
14
14
  call.reject("adId is required")
15
15
  return
16
16
  }
17
- if appOpenAdManager == nil || currentAdUnitId != adUnitId {
18
- appOpenAdManager = AppOpenAdManager(adUnitId: adUnitId)
19
- currentAdUnitId = adUnitId
20
- }
17
+
21
18
  DispatchQueue.main.async {
22
- self.appOpenAdManager?.loadAd(onLoaded: {
19
+ if self.preparedManagers[adUnitId] == nil {
20
+ self.preparedManagers[adUnitId] = AppOpenAdManager(adUnitId: adUnitId)
21
+ }
22
+
23
+ self.preparedManagers[adUnitId]?.loadAd(onLoaded: {
24
+ self.lastPreparedAdId = adUnitId
23
25
  notify(AppOpenAdPluginEvents.Loaded.rawValue, ["adUnitId": adUnitId])
24
26
  call.resolve(["adUnitId": adUnitId])
25
27
  }, onFailed: { error in
@@ -29,6 +31,15 @@ import UIKit
29
31
  "message": message
30
32
  ])
31
33
  call.reject(message)
34
+ }, onPaidEvent: { valueMicros, currencyCode, precision, networkName, impressionId in
35
+ notify(AppOpenAdPluginEvents.AdImpression.rawValue, [
36
+ "adUnitId": adUnitId,
37
+ "valueMicros": valueMicros,
38
+ "currencyCode": currencyCode,
39
+ "precision": precision,
40
+ "networkName": networkName,
41
+ "impressionId": impressionId
42
+ ])
32
43
  })
33
44
  }
34
45
  }
@@ -38,19 +49,37 @@ import UIKit
38
49
  getRootViewController: @escaping () -> UIViewController?,
39
50
  notify: @escaping (String, [String: Any]) -> Void
40
51
  ) {
52
+ guard let adId = call.getString("adId") ?? lastPreparedAdId else {
53
+ call.reject("No ad prepared")
54
+ return
55
+ }
56
+
41
57
  DispatchQueue.main.async {
42
- guard let manager = self.appOpenAdManager, manager.isAdLoaded() else {
58
+ guard let manager = self.preparedManagers[adId], manager.isAdLoaded() else {
43
59
  call.reject("App Open Ad is not loaded")
44
60
  return
45
61
  }
46
62
 
47
63
  if let rootVC = getRootViewController() {
48
- self.appOpenAdManager?.showAdIfAvailable(rootViewController: rootVC, onOpened: {
64
+ manager.showAdIfAvailable(rootViewController: rootVC, onOpened: {
49
65
  notify(AppOpenAdPluginEvents.Opened.rawValue, [:])
50
66
  }, onClosed: {
67
+ self.preparedManagers.removeValue(forKey: adId)
68
+ if self.lastPreparedAdId == adId {
69
+ self.lastPreparedAdId = self.preparedManagers.first(where: { $0.value.isAdLoaded() })?.key
70
+ }
51
71
  notify(AppOpenAdPluginEvents.Closed.rawValue, [:])
52
72
  call.resolve()
53
73
  }, onFailedToShow: { error in
74
+ // A second show request while this ad is already presented fails
75
+ // without consuming the ad. Keep the manager alive so its weak
76
+ // full-screen delegate can still deliver the original close event.
77
+ if !manager.isAdLoaded() {
78
+ self.preparedManagers.removeValue(forKey: adId)
79
+ if self.lastPreparedAdId == adId {
80
+ self.lastPreparedAdId = self.preparedManagers.first(where: { $0.value.isAdLoaded() })?.key
81
+ }
82
+ }
54
83
  let message = error?.localizedDescription ?? "Failed to show App Open Ad"
55
84
  notify(AppOpenAdPluginEvents.FailedToShow.rawValue, [
56
85
  "code": 0,
@@ -65,7 +94,8 @@ import UIKit
65
94
  }
66
95
 
67
96
  @objc func isAppOpenLoaded(_ call: CAPPluginCall) {
68
- let loaded = appOpenAdManager?.isAdLoaded() ?? false
97
+ let adId = call.getString("adId") ?? lastPreparedAdId
98
+ let loaded = adId.flatMap { preparedManagers[$0]?.isAdLoaded() } ?? false
69
99
  call.resolve(["value": loaded])
70
100
  }
71
101
  }
@@ -4,4 +4,5 @@ public enum AppOpenAdPluginEvents: String {
4
4
  case Opened = "appOpenAdOpened"
5
5
  case Closed = "appOpenAdClosed"
6
6
  case FailedToShow = "appOpenAdFailedToShow"
7
+ case AdImpression = "appOpenAdImpression"
7
8
  }
@@ -5,4 +5,5 @@ public enum BannerAdPluginEvents: String {
5
5
  case Opened = "bannerAdOpened"
6
6
  case Loaded = "bannerAdLoaded"
7
7
  case AdImpression = "bannerAdImpression"
8
+ case AdPaid = "bannerAdPaid"
8
9
  }
@@ -49,6 +49,20 @@ class BannerExecutor: NSObject, BannerViewDelegate {
49
49
  self.bannerView.load(request)
50
50
  self.bannerView.delegate = self
51
51
 
52
+ self.bannerView.paidEventHandler = { [weak self] adValue in
53
+ guard let self = self else { return }
54
+ let networkName = self.bannerView.responseInfo?.loadedAdNetworkResponseInfo?.adNetworkClassName ?? ""
55
+ let impressionId = self.bannerView.responseInfo?.responseIdentifier ?? ""
56
+ self.plugin?.notifyListeners(BannerAdPluginEvents.AdPaid.rawValue, data: [
57
+ "adUnitId": self.bannerView.adUnitID ?? "",
58
+ "valueMicros": adValue.value.int64Value,
59
+ "currencyCode": adValue.currencyCode,
60
+ "precision": adValue.precision.rawValue,
61
+ "networkName": networkName,
62
+ "impressionId": impressionId
63
+ ])
64
+ }
65
+
52
66
  call.resolve([:])
53
67
  }
54
68
  }