@capacitor-community/admob 6.2.0-0 → 6.2.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +30 -0
- package/README.md +6 -0
- package/dist/plugin.cjs.js +0 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -3
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/AdMobPlugin/AdMobPlugin.swift +317 -0
- package/ios/Sources/AdMobPlugin/Banner/BannerAdPluginEvents.swift +8 -0
- package/ios/Sources/AdMobPlugin/Banner/BannerAdSizeEnum.swift +10 -0
- package/ios/Sources/AdMobPlugin/Banner/BannerExecutor.swift +186 -0
- package/ios/Sources/AdMobPlugin/Consent/ConsentExecutor.swift +87 -0
- package/ios/Sources/AdMobPlugin/Helper/AuthorizationStatusEnum.swift +6 -0
- package/ios/Sources/AdMobPlugin/Interstitial/AdInterstitialExecutor.swift +65 -0
- package/ios/Sources/AdMobPlugin/Interstitial/InterstitialAdPluginEvents.swift +7 -0
- package/ios/Sources/AdMobPlugin/Models/FullScreenAdEventName.swift +12 -0
- package/ios/Sources/AdMobPlugin/Rewarded/AdRewardExecutor.swift +86 -0
- package/ios/Sources/AdMobPlugin/Rewarded/RewardAdPluginEvents.swift +8 -0
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/AdRewardInterstitialExecutor.swift +86 -0
- package/ios/Sources/AdMobPlugin/RewardedInterstitial/RewardInterstitialAdPluginEvents.swift +8 -0
- package/ios/Tests/AdMobPluginTests/AdMobPluginTests.swift +15 -0
- package/package.json +14 -11
package/Package.swift
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "CapacitorCommunityAdmob",
|
|
6
|
+
platforms: [.iOS(.v13)],
|
|
7
|
+
products: [
|
|
8
|
+
.library(
|
|
9
|
+
name: "CapacitorCommunityAdmob",
|
|
10
|
+
targets: ["AdMobPlugin"])
|
|
11
|
+
],
|
|
12
|
+
dependencies: [
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main"),
|
|
14
|
+
.package(url: "https://github.com/googleads/swift-package-manager-google-mobile-ads.git", branch: "main")
|
|
15
|
+
],
|
|
16
|
+
targets: [
|
|
17
|
+
.target(
|
|
18
|
+
name: "AdMobPlugin",
|
|
19
|
+
dependencies: [
|
|
20
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
21
|
+
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
22
|
+
.product(name: "GoogleMobileAds", package: "swift-package-manager-google-mobile-ads")
|
|
23
|
+
],
|
|
24
|
+
path: "ios/Sources/AdMobPlugin"),
|
|
25
|
+
.testTarget(
|
|
26
|
+
name: "AdMobPluginTests",
|
|
27
|
+
dependencies: ["AdMobPlugin"],
|
|
28
|
+
path: "ios/Tests/AdMobPluginTests")
|
|
29
|
+
]
|
|
30
|
+
)
|
package/README.md
CHANGED
|
@@ -44,6 +44,12 @@ Made with [contributors-img](https://contrib.rocks).
|
|
|
44
44
|
|
|
45
45
|
## Installation
|
|
46
46
|
|
|
47
|
+
If you use capacitor 6 and ios with Swift Package Manager:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
% npm install --save @capacitor-community/admob@next
|
|
51
|
+
```
|
|
52
|
+
|
|
47
53
|
If you use capacitor 5:
|
|
48
54
|
|
|
49
55
|
```
|
package/dist/plugin.cjs.js
CHANGED
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.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/index.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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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(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(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAWA,oCAAmB;AAC9B,CAAC,UAAU,kBAAkB,EAAE;AAC/B;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;AAC9C;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AAChE;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AACxC;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AAC5D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;AClBnD;AACWC,sCAAqB;AAChC,CAAC,UAAU,oBAAoB,EAAE;AACjC,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB,CAAC;AAChE,IA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AAE,OAAO,CAAC,IAAI;AAClC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;AAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS,CAAC;AACV,KAAK;AACL;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.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/index.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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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(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(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,kBAAkB,EAAE;AAC/B;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC7C;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB;AAC/D;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM;AACvC;AACA;AACA;AACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB;AAC3D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;AClBnD;AACWC;AACX,CAAC,UAAU,oBAAoB,EAAE;AACjC,IAAI,oBAAoB,CAAC,aAAa,CAAC,GAAG,qBAAqB;AAC/D,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;AACrD,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,sBAAsB;AACjE;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;AACrD;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;AACrD;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,cAAc,CAAC,GAAG,oBAAoB;AAC/D,CAAC,EAAEA,4BAAoB,KAAKA,4BAAoB,GAAG,EAAE,CAAC,CAAC;;AClBvD;AACA;AACA;AACWC;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,YAAY,CAAC,GAAG,YAAY;AACjD;AACA;AACA;AACA,IAAI,gBAAgB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MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AACvC;AACA,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;AACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;AAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;AAC5B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;AAClC,SAAS;AACT;AACA,IAAI,MAAM,wBAAwB,GAAG;AACrC,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,EAAE;AACpB,YAAY,MAAM,EAAE,CAAC;AACrB,SAAS;AACT;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var capacitorStripe = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
exports.MaxAdContentRating = void 0;
|
|
@@ -340,8 +340,6 @@ var AdMobPlugin = (function (exports, core) {
|
|
|
340
340
|
|
|
341
341
|
exports.AdMob = AdMob;
|
|
342
342
|
|
|
343
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
344
|
-
|
|
345
343
|
return exports;
|
|
346
344
|
|
|
347
345
|
})({}, capacitorExports);
|
package/dist/plugin.js.map
CHANGED
|
@@ -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/index.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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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(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(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","registerPlugin","WebPlugin"],"mappings":";;;AAAWA,wCAAmB;IAC9B,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC9C;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;IAChE;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACxC;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;IAC5D,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;IClBnD;AACWC,0CAAqB;IAChC,CA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C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;IAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC;IACV,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
|
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/index.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 */\n AdmobConsentDebugGeography[AdmobConsentDebugGeography[\"NOT_EEA\"] = 2] = \"NOT_EEA\";\n})(AdmobConsentDebugGeography || (AdmobConsentDebugGeography = {}));\n//# sourceMappingURL=consent-debug-geography.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 { AdMob };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { AdmobConsentStatus } from './consent/consent-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 };\n }\n async showConsentForm() {\n console.log('showConsentForm');\n return {\n status: AdmobConsentStatus.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 // Hide the banner, remove it from screen, but can show it later\n async hideBanner() {\n console.log('hideBanner');\n }\n // Resume the banner, show it after hide\n async resumeBanner() {\n console.log('resumeBanner');\n }\n // Destroy the banner, remove it from screen.\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(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(options);\n return {\n adUnitId: options.adId,\n };\n }\n async showRewardInterstitialAd() {\n return {\n type: '',\n amount: 0,\n };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["MaxAdContentRating","BannerAdPluginEvents","BannerAdPosition","BannerAdSize","InterstitialAdPluginEvents","RewardInterstitialAdPluginEvents","RewardAdPluginEvents","AdmobConsentStatus","AdmobConsentDebugGeography","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,4BAAoB,GAAG,EAAE,CAAC,CAAC;;IClBvD;IACA;IACA;AACWC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7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CAAC;IACnD,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACvC;IACA,IAAI,MAAM,oBAAoB,CAAC,OAAO,EAAE;IACxC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA,IAAI,MAAM,2BAA2B,CAAC,OAAO,EAAE;IAC/C,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IAC5B,QAAQ,OAAO;IACf,YAAY,QAAQ,EAAE,OAAO,CAAC,IAAI;IAClC,SAAS;IACT;IACA,IAAI,MAAM,wBAAwB,GAAG;IACrC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,EAAE;IACpB,YAAY,MAAM,EAAE,CAAC;IACrB,SAAS;IACT;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
#if canImport(AppTrackingTransparency)
|
|
5
|
+
import AppTrackingTransparency
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
@objc(AdMobPlugin)
|
|
9
|
+
public class AdMobPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
+
public let identifier = "AdMob"
|
|
11
|
+
public let jsName = "AdMob"
|
|
12
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
13
|
+
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
|
|
14
|
+
CAPPluginMethod(name: "trackingAuthorizationStatus", returnType: CAPPluginReturnPromise),
|
|
15
|
+
CAPPluginMethod(name: "requestConsentInfo", returnType: CAPPluginReturnPromise),
|
|
16
|
+
CAPPluginMethod(name: "requestTrackingAuthorization", returnType: CAPPluginReturnPromise),
|
|
17
|
+
CAPPluginMethod(name: "showConsentForm", returnType: CAPPluginReturnPromise),
|
|
18
|
+
CAPPluginMethod(name: "resetConsentInfo", returnType: CAPPluginReturnPromise),
|
|
19
|
+
CAPPluginMethod(name: "setApplicationMuted", returnType: CAPPluginReturnPromise),
|
|
20
|
+
CAPPluginMethod(name: "setApplicationVolume", returnType: CAPPluginReturnPromise),
|
|
21
|
+
CAPPluginMethod(name: "showBanner", returnType: CAPPluginReturnPromise),
|
|
22
|
+
CAPPluginMethod(name: "resumeBanner", returnType: CAPPluginReturnPromise),
|
|
23
|
+
CAPPluginMethod(name: "hideBanner", returnType: CAPPluginReturnPromise),
|
|
24
|
+
CAPPluginMethod(name: "removeBanner", returnType: CAPPluginReturnPromise),
|
|
25
|
+
CAPPluginMethod(name: "prepareInterstitial", returnType: CAPPluginReturnPromise),
|
|
26
|
+
CAPPluginMethod(name: "showInterstitial", returnType: CAPPluginReturnPromise),
|
|
27
|
+
CAPPluginMethod(name: "prepareRewardVideoAd", returnType: CAPPluginReturnPromise),
|
|
28
|
+
CAPPluginMethod(name: "showRewardVideoAd", returnType: CAPPluginReturnPromise)
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
var testingDevices: [String] = []
|
|
32
|
+
|
|
33
|
+
private let bannerExecutor = BannerExecutor()
|
|
34
|
+
private let adInterstitialExecutor = AdInterstitialExecutor()
|
|
35
|
+
private let adRewardExecutor = AdRewardExecutor()
|
|
36
|
+
private let adRewardInterstitialExecutor = AdRewardInterstitialExecutor()
|
|
37
|
+
private let consentExecutor = ConsentExecutor()
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Enable SKAdNetwork to track conversions
|
|
41
|
+
* https://developers.google.com/admob/ios/ios14
|
|
42
|
+
*/
|
|
43
|
+
@objc func initialize(_ call: CAPPluginCall) {
|
|
44
|
+
self.bannerExecutor.plugin = self
|
|
45
|
+
self.adInterstitialExecutor.plugin = self
|
|
46
|
+
self.adRewardExecutor.plugin = self
|
|
47
|
+
self.adRewardInterstitialExecutor.plugin = self
|
|
48
|
+
self.adInterstitialExecutor.plugin = self
|
|
49
|
+
self.consentExecutor.plugin = self
|
|
50
|
+
self.setRequestConfiguration(call)
|
|
51
|
+
|
|
52
|
+
GADMobileAds.sharedInstance().start(completionHandler: nil)
|
|
53
|
+
call.resolve([:])
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* DEPRECATED: It's now ship with Admob UMP Consent
|
|
58
|
+
*/
|
|
59
|
+
@objc func requestTrackingAuthorization(_ call: CAPPluginCall) {
|
|
60
|
+
if #available(iOS 14, *) {
|
|
61
|
+
#if canImport(AppTrackingTransparency)
|
|
62
|
+
ATTrackingManager.requestTrackingAuthorization(completionHandler: { _ in
|
|
63
|
+
call.resolve([:])
|
|
64
|
+
})
|
|
65
|
+
#else
|
|
66
|
+
call.resolve([:])
|
|
67
|
+
#endif
|
|
68
|
+
} else {
|
|
69
|
+
call.resolve([:])
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@objc func setApplicationMuted(_ call: CAPPluginCall) {
|
|
74
|
+
if let shouldMute = call.getBool("muted") {
|
|
75
|
+
GADMobileAds.sharedInstance().applicationMuted = shouldMute
|
|
76
|
+
call.resolve([:])
|
|
77
|
+
} else {
|
|
78
|
+
call.reject("muted property cannot be null")
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@objc func setApplicationVolume(_ call: CAPPluginCall) {
|
|
84
|
+
if var volume = call.getFloat("volume") {
|
|
85
|
+
// Clamp volumes.
|
|
86
|
+
if volume < 0.0 {volume = 0.0} else if volume > 1.0 {volume = 1.0}
|
|
87
|
+
|
|
88
|
+
GADMobileAds.sharedInstance().applicationVolume = volume
|
|
89
|
+
|
|
90
|
+
call.resolve([:])
|
|
91
|
+
} else {
|
|
92
|
+
call.reject("volume property cannot be null")
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* AdMob: Banner
|
|
99
|
+
* https://developers.google.com/ad-manager/mobile-ads-sdk/ios/banner?hl=ja
|
|
100
|
+
*/
|
|
101
|
+
@objc func showBanner(_ call: CAPPluginCall) {
|
|
102
|
+
let adUnitID = getAdId(call, "ca-app-pub-3940256099942544/6300978111")
|
|
103
|
+
let request = self.GADRequestWithOption(call.getBool("npa") ?? false)
|
|
104
|
+
|
|
105
|
+
DispatchQueue.main.async {
|
|
106
|
+
self.bannerExecutor.showBanner(call, request, adUnitID)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@objc func hideBanner(_ call: CAPPluginCall) {
|
|
111
|
+
DispatchQueue.main.async {
|
|
112
|
+
self.bannerExecutor.hideBanner(call)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@objc func resumeBanner(_ call: CAPPluginCall) {
|
|
117
|
+
DispatchQueue.main.async {
|
|
118
|
+
self.bannerExecutor.resumeBanner(call)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@objc func removeBanner(_ call: CAPPluginCall) {
|
|
123
|
+
DispatchQueue.main.async {
|
|
124
|
+
self.bannerExecutor.removeBanner(call)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* AdMob: Intertitial
|
|
130
|
+
* https://developers.google.com/admob/ios/interstitial?hl=ja
|
|
131
|
+
*/
|
|
132
|
+
@objc func prepareInterstitial(_ call: CAPPluginCall) {
|
|
133
|
+
let adUnitID = getAdId(call, "ca-app-pub-3940256099942544/1033173712")
|
|
134
|
+
let request = self.GADRequestWithOption(call.getBool("npa") ?? false)
|
|
135
|
+
|
|
136
|
+
DispatchQueue.main.async {
|
|
137
|
+
self.adInterstitialExecutor.prepareInterstitial(call, request, adUnitID)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@objc func showInterstitial(_ call: CAPPluginCall) {
|
|
142
|
+
DispatchQueue.main.async {
|
|
143
|
+
self.adInterstitialExecutor.showInterstitial(call)
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* AdMob: Rewarded Ads
|
|
149
|
+
* https://developers.google.com/ad-manager/mobile-ads-sdk/ios/rewarded-ads
|
|
150
|
+
*/
|
|
151
|
+
@objc func prepareRewardVideoAd(_ call: CAPPluginCall) {
|
|
152
|
+
let adUnitID = getAdId(call, "ca-app-pub-3940256099942544/1712485313")
|
|
153
|
+
let request = self.GADRequestWithOption(call.getBool("npa") ?? false)
|
|
154
|
+
|
|
155
|
+
DispatchQueue.main.async {
|
|
156
|
+
self.adRewardExecutor.prepareRewardVideoAd(call, request, adUnitID)
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@objc func showRewardVideoAd(_ call: CAPPluginCall) {
|
|
161
|
+
DispatchQueue.main.async {
|
|
162
|
+
self.adRewardExecutor.showRewardVideoAd(call)
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* AdMob: Rewarded Interstitial Ads
|
|
168
|
+
* https://developers.google.com/ad-manager/mobile-ads-sdk/ios/rewarded-interstitial
|
|
169
|
+
*/
|
|
170
|
+
@objc func prepareRewardInterstitialAd(_ call: CAPPluginCall) {
|
|
171
|
+
let adUnitID = getAdId(call, "ca-app-pub-3940256099942544/6978759866")
|
|
172
|
+
let request = self.GADRequestWithOption(call.getBool("npa") ?? false)
|
|
173
|
+
|
|
174
|
+
DispatchQueue.main.async {
|
|
175
|
+
self.adRewardInterstitialExecutor.prepareRewardInterstitialAd(call, request, adUnitID)
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@objc func showRewardInterstitialAd(_ call: CAPPluginCall) {
|
|
180
|
+
DispatchQueue.main.async {
|
|
181
|
+
self.adRewardInterstitialExecutor.showRewardInterstitialAd(call)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@objc func trackingAuthorizationStatus(_ call: CAPPluginCall) {
|
|
186
|
+
DispatchQueue.main.async {
|
|
187
|
+
if #available(iOS 14, *) {
|
|
188
|
+
switch ATTrackingManager.trackingAuthorizationStatus {
|
|
189
|
+
case .authorized:
|
|
190
|
+
call.resolve(["status": AuthorizationStatusEnum.Authorized.rawValue])
|
|
191
|
+
break
|
|
192
|
+
case .denied:
|
|
193
|
+
call.resolve(["status": AuthorizationStatusEnum.Denied.rawValue])
|
|
194
|
+
break
|
|
195
|
+
case .restricted:
|
|
196
|
+
call.resolve(["status": AuthorizationStatusEnum.Restricted.rawValue])
|
|
197
|
+
break
|
|
198
|
+
case .notDetermined:
|
|
199
|
+
call.resolve(["status": AuthorizationStatusEnum.NotDetermined.rawValue])
|
|
200
|
+
break
|
|
201
|
+
@unknown default:
|
|
202
|
+
call.reject("trackingAuthorizationStatus can't get status")
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
call.resolve(["status": AuthorizationStatusEnum.Authorized])
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Admob: User Message Platform
|
|
212
|
+
* https://support.google.com/admob/answer/10113005?hl=en
|
|
213
|
+
*/
|
|
214
|
+
@objc func requestConsentInfo(_ call: CAPPluginCall) {
|
|
215
|
+
let debugGeography = call.getInt("debugGeography", 0)
|
|
216
|
+
|
|
217
|
+
let testDeviceJSArray = call.getArray("testDeviceIdentifiers") ?? []
|
|
218
|
+
var testDeviceIdentifiers: [String] = []
|
|
219
|
+
if testDeviceJSArray.count > 0 {
|
|
220
|
+
for deviceId in testDeviceJSArray {
|
|
221
|
+
if let name = deviceId as? String {
|
|
222
|
+
testDeviceIdentifiers.append(name)
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
let tagForUnderAgeOfConsent = call.getBool("tagForUnderAgeOfConsent", false)
|
|
228
|
+
|
|
229
|
+
DispatchQueue.main.async {
|
|
230
|
+
self.consentExecutor.requestConsentInfo(call, debugGeography, testDeviceIdentifiers, tagForUnderAgeOfConsent)
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@objc func showConsentForm(_ call: CAPPluginCall) {
|
|
235
|
+
DispatchQueue.main.async {
|
|
236
|
+
self.consentExecutor.showConsentForm(call)
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@objc func resetConsentInfo(_ call: CAPPluginCall) {
|
|
241
|
+
DispatchQueue.main.async {
|
|
242
|
+
self.consentExecutor.resetConsentInfo(call)
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
private func getAdId(_ call: CAPPluginCall, _ testingID: String) -> String {
|
|
247
|
+
let adUnitID = call.getString("adId") ?? testingID
|
|
248
|
+
let isTest = call.getBool("isTesting") ?? false
|
|
249
|
+
if isTest {
|
|
250
|
+
return testingID
|
|
251
|
+
}
|
|
252
|
+
return adUnitID
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
private func GADRequestWithOption(_ npa: Bool) -> GADRequest {
|
|
256
|
+
let request = GADRequest()
|
|
257
|
+
|
|
258
|
+
if npa {
|
|
259
|
+
let extras = GADExtras()
|
|
260
|
+
extras.additionalParameters = ["npa": "1"]
|
|
261
|
+
request.register(extras)
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return request
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* https://developers.google.com/admob/ios/targeting?hl=ja
|
|
269
|
+
*/
|
|
270
|
+
private func setRequestConfiguration(_ call: CAPPluginCall) {
|
|
271
|
+
|
|
272
|
+
if call.getBool("initializeForTesting") ?? false {
|
|
273
|
+
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = call.getArray("testingDevices", String.self) ?? []
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if call.getBool("tagForChildDirectedTreatment") == true {
|
|
277
|
+
GADMobileAds.sharedInstance().requestConfiguration.tagForChildDirectedTreatment = true
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if call.getBool("tagForUnderAgeOfConsent") == true {
|
|
281
|
+
GADMobileAds.sharedInstance().requestConfiguration.tagForUnderAgeOfConsent = true
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if call.getString("maxAdContentRating") != nil {
|
|
285
|
+
switch call.getString("maxAdContentRating") {
|
|
286
|
+
case "General":
|
|
287
|
+
GADMobileAds.sharedInstance().requestConfiguration.maxAdContentRating =
|
|
288
|
+
GADMaxAdContentRating.general
|
|
289
|
+
case "ParentalGuidance":
|
|
290
|
+
GADMobileAds.sharedInstance().requestConfiguration.maxAdContentRating =
|
|
291
|
+
GADMaxAdContentRating.parentalGuidance
|
|
292
|
+
case "Teen":
|
|
293
|
+
GADMobileAds.sharedInstance().requestConfiguration.maxAdContentRating =
|
|
294
|
+
GADMaxAdContentRating.teen
|
|
295
|
+
case "MatureAudience":
|
|
296
|
+
GADMobileAds.sharedInstance().requestConfiguration.maxAdContentRating =
|
|
297
|
+
GADMaxAdContentRating.matureAudience
|
|
298
|
+
default:
|
|
299
|
+
print("maxAdContentRating can't find value")
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
func getRootVC() -> UIViewController? {
|
|
306
|
+
var window: UIWindow? = UIApplication.shared.delegate?.window ?? nil
|
|
307
|
+
|
|
308
|
+
if window == nil {
|
|
309
|
+
let scene: UIWindowScene? = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
|
310
|
+
window = scene?.windows.filter({$0.isKeyWindow}).first
|
|
311
|
+
if window == nil {
|
|
312
|
+
window = scene?.windows.first
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return window?.rootViewController
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
public enum BannerAdPluginEvents: String {
|
|
2
|
+
case SizeChanged = "bannerAdSizeChanged"
|
|
3
|
+
case Closed = "bannerAdClosed"
|
|
4
|
+
case FailedToLoad = "bannerAdFailedToLoad"
|
|
5
|
+
case Opened = "bannerAdOpened"
|
|
6
|
+
case Loaded = "bannerAdLoaded"
|
|
7
|
+
case AdImpression = "bannerAdImpression"
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
public enum BannerAdSizeEnum: String {
|
|
2
|
+
case BANNER = "BANNER"
|
|
3
|
+
case FULL_BANNER = "FULL_BANNER"
|
|
4
|
+
case LARGE_BANNER = "LARGE_BANNER"
|
|
5
|
+
case LEADERBOARD = "LEADERBOARD"
|
|
6
|
+
case MEDIUM_RECTANGLE = "MEDIUM_RECTANGLE"
|
|
7
|
+
case WIDE_SKYSCRAPER = "WIDE_SKYSCRAPER"
|
|
8
|
+
case ADAPTIVE_BANNER = "ADAPTIVE_BANNER"
|
|
9
|
+
// case FLUID = "FLUID"
|
|
10
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
|
|
5
|
+
class BannerExecutor: NSObject, GADBannerViewDelegate {
|
|
6
|
+
weak var plugin: AdMobPlugin?
|
|
7
|
+
var bannerView: GADBannerView!
|
|
8
|
+
|
|
9
|
+
func showBanner(_ call: CAPPluginCall, _ request: GADRequest, _ adUnitID: String) {
|
|
10
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
11
|
+
|
|
12
|
+
let adSize = call.getString("adSize") ?? "ADAPTIVE_BANNER"
|
|
13
|
+
let adPosition = call.getString("position") ?? "BOTTOM_CENTER"
|
|
14
|
+
let adMargin = call.getInt("margin") ?? 0
|
|
15
|
+
|
|
16
|
+
var bannerSize: GADAdSize
|
|
17
|
+
|
|
18
|
+
switch adSize {
|
|
19
|
+
case "BANNER":
|
|
20
|
+
bannerSize = GADAdSizeBanner
|
|
21
|
+
break
|
|
22
|
+
case "LARGE_BANNER":
|
|
23
|
+
bannerSize = GADAdSizeLargeBanner
|
|
24
|
+
break
|
|
25
|
+
case "FULL_BANNER":
|
|
26
|
+
bannerSize = GADAdSizeFullBanner
|
|
27
|
+
break
|
|
28
|
+
case "LEADERBOARD":
|
|
29
|
+
bannerSize = GADAdSizeLeaderboard
|
|
30
|
+
break
|
|
31
|
+
case "MEDIUM_RECTANGLE":
|
|
32
|
+
bannerSize = GADAdSizeMediumRectangle
|
|
33
|
+
break
|
|
34
|
+
case "SMART_BANNER":
|
|
35
|
+
bannerSize = kGADAdSizeSmartBannerPortrait
|
|
36
|
+
break
|
|
37
|
+
default: // ADAPTIVE_BANNER
|
|
38
|
+
let frame = { () -> CGRect in
|
|
39
|
+
// Here safe area is taken into account, hence the view frame is used
|
|
40
|
+
// after the view has been laid out.
|
|
41
|
+
if #available(iOS 11.0, *) {
|
|
42
|
+
return rootViewController.view.frame.inset(by: rootViewController.view.safeAreaInsets)
|
|
43
|
+
} else {
|
|
44
|
+
return rootViewController.view.frame
|
|
45
|
+
}
|
|
46
|
+
}()
|
|
47
|
+
let viewWidth = frame.size.width
|
|
48
|
+
bannerSize = GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(viewWidth)
|
|
49
|
+
break
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
self.bannerView = GADBannerView(adSize: bannerSize)
|
|
53
|
+
self.addBannerViewToView(self.bannerView, adPosition, adMargin)
|
|
54
|
+
self.bannerView.translatesAutoresizingMaskIntoConstraints = false
|
|
55
|
+
self.bannerView.adUnitID = adUnitID
|
|
56
|
+
self.bannerView.rootViewController = plugin?.getRootVC()
|
|
57
|
+
|
|
58
|
+
self.bannerView.load(request)
|
|
59
|
+
self.bannerView.delegate = self
|
|
60
|
+
|
|
61
|
+
call.resolve([:])
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
func hideBanner(_ call: CAPPluginCall) {
|
|
66
|
+
DispatchQueue.main.async {
|
|
67
|
+
if let rootViewController = self.plugin?.getRootVC() {
|
|
68
|
+
if let subView = rootViewController.view.viewWithTag(2743243288699) {
|
|
69
|
+
NSLog("AdMob: find subView for hideBanner")
|
|
70
|
+
subView.isHidden = true
|
|
71
|
+
} else {
|
|
72
|
+
NSLog("AdMob: not find subView for resumeBanner for hideBanner")
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
77
|
+
"width": 0,
|
|
78
|
+
"height": 0
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
call.resolve([:])
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
func resumeBanner(_ call: CAPPluginCall) {
|
|
86
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
87
|
+
if let subView = rootViewController.view.viewWithTag(2743243288699) {
|
|
88
|
+
NSLog("AdMob: find subView for resumeBanner")
|
|
89
|
+
subView.isHidden = false
|
|
90
|
+
|
|
91
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
92
|
+
"width": subView.frame.width,
|
|
93
|
+
"height": subView.frame.height
|
|
94
|
+
])
|
|
95
|
+
|
|
96
|
+
call.resolve([:])
|
|
97
|
+
|
|
98
|
+
} else {
|
|
99
|
+
NSLog("AdMob: not find subView for resumeBanner")
|
|
100
|
+
call.reject("AdMob: not find subView for resumeBanner")
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
func removeBanner(_ call: CAPPluginCall) {
|
|
106
|
+
self.removeBannerViewToView()
|
|
107
|
+
call.resolve([:])
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private func addBannerViewToView(_ bannerView: GADBannerView, _ adPosition: String, _ Margin: Int) {
|
|
111
|
+
removeBannerViewToView()
|
|
112
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
113
|
+
|
|
114
|
+
bannerView.translatesAutoresizingMaskIntoConstraints = false
|
|
115
|
+
bannerView.tag = 2743243288699 // rand
|
|
116
|
+
rootViewController.view.addSubview(bannerView)
|
|
117
|
+
rootViewController.view.addConstraints(
|
|
118
|
+
[NSLayoutConstraint(item: bannerView,
|
|
119
|
+
attribute: adPosition == "TOP_CENTER" ? .top : .bottom,
|
|
120
|
+
relatedBy: .equal,
|
|
121
|
+
toItem: rootViewController.view.safeAreaLayoutGuide,
|
|
122
|
+
attribute: adPosition == "TOP_CENTER" ? .top : .bottom,
|
|
123
|
+
multiplier: 1,
|
|
124
|
+
constant: CGFloat(Int(Margin) * -1)),
|
|
125
|
+
NSLayoutConstraint(item: bannerView,
|
|
126
|
+
attribute: .centerX,
|
|
127
|
+
relatedBy: .equal,
|
|
128
|
+
toItem: rootViewController.view,
|
|
129
|
+
attribute: .centerX,
|
|
130
|
+
multiplier: 1,
|
|
131
|
+
constant: 0)
|
|
132
|
+
])
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private func removeBannerViewToView() {
|
|
137
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
138
|
+
if let subView = rootViewController.view.viewWithTag(2743243288699) {
|
|
139
|
+
bannerView.delegate = nil
|
|
140
|
+
NSLog("AdMob: find subView")
|
|
141
|
+
subView.removeFromSuperview()
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/// Tells the delegate an ad request loaded an ad.
|
|
147
|
+
func bannerViewDidReceiveAd(_ bannerView: GADBannerView) {
|
|
148
|
+
NSLog("bannerViewDidReceiveAd")
|
|
149
|
+
|
|
150
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
151
|
+
"width": bannerView.frame.width,
|
|
152
|
+
"height": bannerView.frame.height
|
|
153
|
+
])
|
|
154
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/// Tells the delegate an ad request failed.
|
|
158
|
+
func bannerView(_ bannerView: GADBannerView,
|
|
159
|
+
didFailToReceiveAdWithError error: Error) {
|
|
160
|
+
NSLog("bannerView:didFailToReceiveAdWithError: \(error.localizedDescription)")
|
|
161
|
+
self.removeBannerViewToView()
|
|
162
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
163
|
+
"width": 0,
|
|
164
|
+
"height": 0
|
|
165
|
+
])
|
|
166
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.FailedToLoad.rawValue, data: [
|
|
167
|
+
"code": 0,
|
|
168
|
+
"message": error.localizedDescription
|
|
169
|
+
])
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
func bannerViewDidRecordImpression(_ bannerView: GADBannerView) {
|
|
173
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.AdImpression.rawValue, data: [:])
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/// Tells the delegate that a full-screen view will be presented in response
|
|
177
|
+
/// to the user clicking on an ad.
|
|
178
|
+
func bannerViewWillPresentScreen(_ bannerView: GADBannerView) {
|
|
179
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.Opened.rawValue, data: [:])
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/// Tells the delegate that the full-screen view will be dismissed.
|
|
183
|
+
func bannerViewWillDismissScreen(_ bannerView: GADBannerView) {
|
|
184
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.Closed.rawValue, data: [:])
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
import UserMessagingPlatform
|
|
5
|
+
|
|
6
|
+
class ConsentExecutor: NSObject {
|
|
7
|
+
weak var plugin: AdMobPlugin?
|
|
8
|
+
|
|
9
|
+
func requestConsentInfo(_ call: CAPPluginCall, _ debugGeography: Int, _ testDeviceIdentifiers: [String], _ tagForUnderAgeOfConsent: Bool) {
|
|
10
|
+
let parameters = UMPRequestParameters()
|
|
11
|
+
let debugSettings = UMPDebugSettings()
|
|
12
|
+
|
|
13
|
+
debugSettings.geography = UMPDebugGeography(rawValue: debugGeography) ?? UMPDebugGeography.disabled
|
|
14
|
+
debugSettings.testDeviceIdentifiers = testDeviceIdentifiers
|
|
15
|
+
|
|
16
|
+
parameters.debugSettings = debugSettings
|
|
17
|
+
parameters.tagForUnderAgeOfConsent = tagForUnderAgeOfConsent
|
|
18
|
+
|
|
19
|
+
// Request an update to the consent information.
|
|
20
|
+
UMPConsentInformation.sharedInstance.requestConsentInfoUpdate(
|
|
21
|
+
with: parameters,
|
|
22
|
+
completionHandler: { error in
|
|
23
|
+
if error != nil {
|
|
24
|
+
call.reject("Request consent info failed")
|
|
25
|
+
} else {
|
|
26
|
+
call.resolve([
|
|
27
|
+
"status": self.getConsentStatusString(UMPConsentInformation.sharedInstance.consentStatus),
|
|
28
|
+
"isConsentFormAvailable": UMPConsentInformation.sharedInstance.formStatus == UMPFormStatus.available
|
|
29
|
+
])
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
func showConsentForm(_ call: CAPPluginCall) {
|
|
35
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
36
|
+
let formStatus = UMPConsentInformation.sharedInstance.formStatus
|
|
37
|
+
|
|
38
|
+
if formStatus == UMPFormStatus.available {
|
|
39
|
+
UMPConsentForm.load(completionHandler: {form, loadError in
|
|
40
|
+
if loadError != nil {
|
|
41
|
+
call.reject(loadError?.localizedDescription ?? "Load consent form error")
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if UMPConsentInformation.sharedInstance.consentStatus == UMPConsentStatus.required {
|
|
46
|
+
form?.present(from: rootViewController, completionHandler: { dismissError in
|
|
47
|
+
if dismissError != nil {
|
|
48
|
+
call.reject(dismissError?.localizedDescription ?? "Consent dismiss error")
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
call.resolve([
|
|
53
|
+
"status": self.getConsentStatusString(UMPConsentInformation.sharedInstance.consentStatus)
|
|
54
|
+
])
|
|
55
|
+
})
|
|
56
|
+
} else {
|
|
57
|
+
call.resolve([
|
|
58
|
+
"status": self.getConsentStatusString(UMPConsentInformation.sharedInstance.consentStatus)
|
|
59
|
+
])
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
} else {
|
|
63
|
+
call.reject("Consent Form not available")
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
call.reject("No ViewController")
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
func resetConsentInfo(_ call: CAPPluginCall) {
|
|
71
|
+
UMPConsentInformation.sharedInstance.reset()
|
|
72
|
+
call.resolve()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
func getConsentStatusString(_ consentStatus: UMPConsentStatus) -> String {
|
|
76
|
+
switch consentStatus {
|
|
77
|
+
case UMPConsentStatus.required:
|
|
78
|
+
return "REQUIRED"
|
|
79
|
+
case UMPConsentStatus.notRequired:
|
|
80
|
+
return "NOT_REQUIRED"
|
|
81
|
+
case UMPConsentStatus.obtained:
|
|
82
|
+
return "OBTAINED"
|
|
83
|
+
default:
|
|
84
|
+
return "UNKNOWN"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
|
|
5
|
+
class AdInterstitialExecutor: NSObject, GADFullScreenContentDelegate {
|
|
6
|
+
weak var plugin: AdMobPlugin?
|
|
7
|
+
var interstitial: GADInterstitialAd!
|
|
8
|
+
|
|
9
|
+
func prepareInterstitial(_ call: CAPPluginCall, _ request: GADRequest, _ adUnitID: String) {
|
|
10
|
+
GADInterstitialAd.load(
|
|
11
|
+
withAdUnitID: adUnitID,
|
|
12
|
+
request: request,
|
|
13
|
+
completionHandler: { (ad, error) in
|
|
14
|
+
if let error = error {
|
|
15
|
+
NSLog("Rewarded ad failed to load with error: \(error.localizedDescription)")
|
|
16
|
+
self.plugin?.notifyListeners(InterstitialAdPluginEvents.FailedToLoad.rawValue, data: [
|
|
17
|
+
"code": 0,
|
|
18
|
+
"message": error.localizedDescription
|
|
19
|
+
])
|
|
20
|
+
call.reject("Loading failed")
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
self.interstitial = ad
|
|
25
|
+
self.interstitial.fullScreenContentDelegate = self
|
|
26
|
+
self.plugin?.notifyListeners(InterstitialAdPluginEvents.Loaded.rawValue, data: [
|
|
27
|
+
"adUnitId": adUnitID
|
|
28
|
+
])
|
|
29
|
+
call.resolve([
|
|
30
|
+
"adUnitId": adUnitID
|
|
31
|
+
])
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
func showInterstitial(_ call: CAPPluginCall) {
|
|
37
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
38
|
+
if let ad = self.interstitial {
|
|
39
|
+
ad.present(fromRootViewController: rootViewController)
|
|
40
|
+
call.resolve([:])
|
|
41
|
+
} else {
|
|
42
|
+
NSLog("Ad wasn't ready")
|
|
43
|
+
call.reject("Ad wasn't ready")
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
|
|
49
|
+
NSLog("InterstitialFullScreenDelegate Ad failed to present full screen content with error \(error.localizedDescription).")
|
|
50
|
+
self.plugin?.notifyListeners(InterstitialAdPluginEvents.FailedToShow.rawValue, data: [
|
|
51
|
+
"code": 0,
|
|
52
|
+
"message": error.localizedDescription
|
|
53
|
+
])
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
func adWillPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
57
|
+
NSLog("InterstitialFullScreenDelegate Ad did present full screen content.")
|
|
58
|
+
self.plugin?.notifyListeners(InterstitialAdPluginEvents.Showed.rawValue, data: [:])
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
62
|
+
NSLog("InterstitialFullScreenDelegate Ad did dismiss full screen content.")
|
|
63
|
+
self.plugin?.notifyListeners(InterstitialAdPluginEvents.Dismissed.rawValue, data: [:])
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
public enum InterstitialAdPluginEvents: String {
|
|
2
|
+
case Loaded = "interstitialAdLoaded"
|
|
3
|
+
case FailedToLoad = "interstitialAdFailedToLoad"
|
|
4
|
+
case Showed = "interstitialAdShowed"
|
|
5
|
+
case FailedToShow = "interstitialAdFailedToShow"
|
|
6
|
+
case Dismissed = "interstitialAdDismissed"
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
public enum FullScreenAdEventName: String {
|
|
2
|
+
case onAdLoaded = "onAdLoaded"
|
|
3
|
+
case onAdFailedToLoad = "onAdFailedToLoad"
|
|
4
|
+
case adDidPresentFullScreenContent = "adDidPresentFullScreenContent"
|
|
5
|
+
case didFailToPresentFullScreenContentWithError = "didFailToPresentFullScreenContentWithError"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Follow iOS Event Name
|
|
9
|
+
* https://developers.google.com/admob/ios/api/reference/Protocols/GADFullScreenContentDelegate#-addidpresentfullscreencontent:
|
|
10
|
+
*/
|
|
11
|
+
case adDidDismissFullScreenContent = "adDidDismissFullScreenContent"
|
|
12
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
|
|
5
|
+
class AdRewardExecutor: NSObject, GADFullScreenContentDelegate {
|
|
6
|
+
weak var plugin: AdMobPlugin?
|
|
7
|
+
var rewardedAd: GADRewardedAd!
|
|
8
|
+
|
|
9
|
+
func prepareRewardVideoAd(_ call: CAPPluginCall, _ request: GADRequest, _ adUnitID: String) {
|
|
10
|
+
GADRewardedAd.load(
|
|
11
|
+
withAdUnitID: adUnitID,
|
|
12
|
+
request: request,
|
|
13
|
+
completionHandler: { (ad, error) in
|
|
14
|
+
if let error = error {
|
|
15
|
+
NSLog("Rewarded ad failed to load with error: \(error.localizedDescription)")
|
|
16
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.FailedToLoad.rawValue, data: [
|
|
17
|
+
"code": 0,
|
|
18
|
+
"message": error.localizedDescription
|
|
19
|
+
])
|
|
20
|
+
call.reject("Loading failed")
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
self.rewardedAd = ad
|
|
25
|
+
|
|
26
|
+
if let providedOptions = call.getObject("ssv") {
|
|
27
|
+
let ssvOptions = GADServerSideVerificationOptions()
|
|
28
|
+
|
|
29
|
+
if let customData = providedOptions["customData"] as? String {
|
|
30
|
+
NSLog("Sending Custom Data: \(customData) to SSV callback")
|
|
31
|
+
ssvOptions.customRewardString = customData
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if let userId = providedOptions["userId"] as? String {
|
|
35
|
+
NSLog("Sending UserId: \(userId) to SSV callback")
|
|
36
|
+
ssvOptions.userIdentifier = userId
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
self.rewardedAd?.serverSideVerificationOptions = ssvOptions
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
self.rewardedAd?.fullScreenContentDelegate = self
|
|
43
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.Loaded.rawValue, data: [
|
|
44
|
+
"adUnitId": adUnitID
|
|
45
|
+
])
|
|
46
|
+
call.resolve([
|
|
47
|
+
"adUnitId": adUnitID
|
|
48
|
+
])
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
func showRewardVideoAd(_ call: CAPPluginCall) {
|
|
54
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
55
|
+
if let ad = self.rewardedAd {
|
|
56
|
+
ad.present(fromRootViewController: rootViewController,
|
|
57
|
+
userDidEarnRewardHandler: {
|
|
58
|
+
let reward = ad.adReward
|
|
59
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.Rewarded.rawValue, data: ["type": reward.type, "amount": reward.amount])
|
|
60
|
+
call.resolve(["type": reward.type, "amount": reward.amount])
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
} else {
|
|
64
|
+
call.reject("Reward Video is Not Ready Yet")
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
|
|
70
|
+
NSLog("RewardFullScreenDelegate Ad failed to present full screen content with error \(error.localizedDescription).")
|
|
71
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.FailedToShow.rawValue, data: [
|
|
72
|
+
"code": 0,
|
|
73
|
+
"message": error.localizedDescription
|
|
74
|
+
])
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
func adWillPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
78
|
+
NSLog("RewardFullScreenDelegate Ad did present full screen content.")
|
|
79
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.Showed.rawValue, data: [:])
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
83
|
+
NSLog("RewardFullScreenDelegate Ad did dismiss full screen content.")
|
|
84
|
+
self.plugin?.notifyListeners(RewardAdPluginEvents.Dismissed.rawValue, data: [:])
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
public enum RewardAdPluginEvents: String {
|
|
2
|
+
case Loaded = "onRewardedVideoAdLoaded"
|
|
3
|
+
case FailedToLoad = "onRewardedVideoAdFailedToLoad"
|
|
4
|
+
case Showed = "onRewardedVideoAdShowed"
|
|
5
|
+
case FailedToShow = "onRewardedVideoAdFailedToShow"
|
|
6
|
+
case Dismissed = "onRewardedVideoAdDismissed"
|
|
7
|
+
case Rewarded = "onRewardedVideoAdReward"
|
|
8
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
import GoogleMobileAds
|
|
4
|
+
|
|
5
|
+
class AdRewardInterstitialExecutor: NSObject, GADFullScreenContentDelegate {
|
|
6
|
+
weak var plugin: AdMobPlugin?
|
|
7
|
+
var rewardedInterstitialAd: GADRewardedInterstitialAd!
|
|
8
|
+
|
|
9
|
+
func prepareRewardInterstitialAd(_ call: CAPPluginCall, _ request: GADRequest, _ adUnitID: String) {
|
|
10
|
+
GADRewardedInterstitialAd.load(
|
|
11
|
+
withAdUnitID: adUnitID,
|
|
12
|
+
request: request,
|
|
13
|
+
completionHandler: { (ad, error) in
|
|
14
|
+
if let error = error {
|
|
15
|
+
NSLog("Rewarded ad failed to load with error: \(error.localizedDescription)")
|
|
16
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.FailedToLoad.rawValue, data: [
|
|
17
|
+
"code": 0,
|
|
18
|
+
"message": error.localizedDescription
|
|
19
|
+
])
|
|
20
|
+
call.reject("Loading failed")
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
self.rewardedInterstitialAd = ad
|
|
25
|
+
|
|
26
|
+
if let providedOptions = call.getObject("ssv") {
|
|
27
|
+
let ssvOptions = GADServerSideVerificationOptions()
|
|
28
|
+
|
|
29
|
+
if let customData = providedOptions["customData"] as? String {
|
|
30
|
+
NSLog("Sending Custom Data: \(customData) to SSV callback")
|
|
31
|
+
ssvOptions.customRewardString = customData
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if let userId = providedOptions["userId"] as? String {
|
|
35
|
+
NSLog("Sending UserId: \(userId) to SSV callback")
|
|
36
|
+
ssvOptions.userIdentifier = userId
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
self.rewardedInterstitialAd?.serverSideVerificationOptions = ssvOptions
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
self.rewardedInterstitialAd?.fullScreenContentDelegate = self
|
|
43
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.Loaded.rawValue, data: [
|
|
44
|
+
"adUnitId": adUnitID
|
|
45
|
+
])
|
|
46
|
+
call.resolve([
|
|
47
|
+
"adUnitId": adUnitID
|
|
48
|
+
])
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
func showRewardInterstitialAd(_ call: CAPPluginCall) {
|
|
54
|
+
if let rootViewController = plugin?.getRootVC() {
|
|
55
|
+
if let ad = self.rewardedInterstitialAd {
|
|
56
|
+
ad.present(fromRootViewController: rootViewController,
|
|
57
|
+
userDidEarnRewardHandler: {
|
|
58
|
+
let reward = ad.adReward
|
|
59
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.Rewarded.rawValue, data: ["type": reward.type, "amount": reward.amount])
|
|
60
|
+
call.resolve(["type": reward.type, "amount": reward.amount])
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
} else {
|
|
64
|
+
call.reject("Reward Video is Not Ready Yet")
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
|
|
70
|
+
NSLog("RewardFullScreenDelegate Ad failed to present full screen content with error \(error.localizedDescription).")
|
|
71
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.FailedToShow.rawValue, data: [
|
|
72
|
+
"code": 0,
|
|
73
|
+
"message": error.localizedDescription
|
|
74
|
+
])
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
func adWillPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
78
|
+
NSLog("RewardFullScreenDelegate Ad did present full screen content.")
|
|
79
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.Showed.rawValue, data: [:])
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) {
|
|
83
|
+
NSLog("RewardFullScreenDelegate Ad did dismiss full screen content.")
|
|
84
|
+
self.plugin?.notifyListeners(RewardInterstitialAdPluginEvents.Dismissed.rawValue, data: [:])
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
public enum RewardInterstitialAdPluginEvents: String {
|
|
2
|
+
case Loaded = "onRewardedInterstitialAdLoaded"
|
|
3
|
+
case FailedToLoad = "onRewardedInterstitialAdFailedToLoad"
|
|
4
|
+
case Showed = "onRewardedInterstitialAdShowed"
|
|
5
|
+
case FailedToShow = "onRewardedInterstitialAdFailedToShow"
|
|
6
|
+
case Dismissed = "onRewardedInterstitialAdDismissed"
|
|
7
|
+
case Rewarded = "onRewardedInterstitialAdReward"
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
@testable import AdMobPlugin
|
|
3
|
+
|
|
4
|
+
class AdMobTests: XCTestCase {
|
|
5
|
+
func testEcho() {
|
|
6
|
+
// This is an example of a functional test case for a plugin.
|
|
7
|
+
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
8
|
+
|
|
9
|
+
// let implementation = AdMob()
|
|
10
|
+
// let value = "Hello, World!"
|
|
11
|
+
// let result = implementation.echo(value)
|
|
12
|
+
//
|
|
13
|
+
// XCTAssertEqual(value, result)
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-community/admob",
|
|
3
|
-
"version": "6.2.0-
|
|
3
|
+
"version": "6.2.0-1",
|
|
4
4
|
"description": "A native plugin for AdMob",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"android/src/main/",
|
|
14
14
|
"android/build.gradle",
|
|
15
15
|
"dist/",
|
|
16
|
-
"ios/
|
|
16
|
+
"ios/Sources",
|
|
17
|
+
"ios/Tests",
|
|
18
|
+
"Package.swift",
|
|
17
19
|
"CapacitorCommunityAdmob.podspec"
|
|
18
20
|
],
|
|
19
21
|
"author": "Masahiko Sakakibara <sakakibara@rdlabo.jp>",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"prettier": "prettier \"{src/*.ts,**/*.java}\"",
|
|
37
39
|
"swiftlint": "node-swiftlint",
|
|
38
40
|
"docgen": "docgen --api AdMobPlugin --output-readme README.md --output-json dist/docs.json",
|
|
39
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
|
41
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
40
42
|
"clean": "rimraf ./dist",
|
|
41
43
|
"watch": "tsc --watch",
|
|
42
44
|
"prepublishOnly": "npm run build",
|
|
@@ -49,18 +51,19 @@
|
|
|
49
51
|
"@capacitor/core": "^6.0.0",
|
|
50
52
|
"@capacitor/docgen": "git+https://github.com/rdlabo/capacitor-docgen.git#feat/support_extends_build",
|
|
51
53
|
"@capacitor/ios": "^6.0.0",
|
|
52
|
-
"@ionic/eslint-config": "^0.3.0",
|
|
53
|
-
"@ionic/prettier-config": "^1.0.1",
|
|
54
|
-
"@ionic/swiftlint-config": "^2.0.0",
|
|
55
|
-
"eslint": "^7.11.0",
|
|
56
54
|
"husky": "^9.1.7",
|
|
57
55
|
"lint-staged": "^15.2.10",
|
|
58
56
|
"np": "^8.0.4",
|
|
59
57
|
"pre-commit": "^1.2.2",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
|
59
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
60
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
61
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
62
|
+
"eslint": "^8.57.0",
|
|
63
|
+
"prettier": "^3.3.3",
|
|
64
|
+
"prettier-plugin-java": "^2.6.4",
|
|
65
|
+
"rimraf": "^6.0.1",
|
|
66
|
+
"rollup": "^4.24.0",
|
|
64
67
|
"swiftlint": "^2.0.0",
|
|
65
68
|
"typescript": "~4.1.5"
|
|
66
69
|
},
|