@capacitor-community/admob 7.1.0-0 → 7.1.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.
|
@@ -128,7 +128,7 @@ class BannerExecutor: NSObject, BannerViewDelegate {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/// Tells the delegate an ad request loaded an ad.
|
|
131
|
-
func bannerViewDidReceiveAd(_ bannerView:
|
|
131
|
+
func bannerViewDidReceiveAd(_ bannerView: BannerView) {
|
|
132
132
|
NSLog("bannerViewDidReceiveAd")
|
|
133
133
|
if let rootViewController = plugin?.getRootVC() {
|
|
134
134
|
rootViewController.view.addSubview(bannerView)
|
|
@@ -148,30 +148,15 @@ class BannerExecutor: NSObject, BannerViewDelegate {
|
|
|
148
148
|
multiplier: 1,
|
|
149
149
|
constant: 0)
|
|
150
150
|
])
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
152
|
+
"width": bannerView.frame.width,
|
|
153
|
+
"height": bannerView.frame.height
|
|
154
|
+
])
|
|
155
|
+
self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
|
|
153
156
|
|
|
154
|
-
private func removeBannerViewToView() {
|
|
155
|
-
if let rootViewController = plugin?.getRootVC() {
|
|
156
|
-
if let subView = rootViewController.view.viewWithTag(2743243288699) {
|
|
157
|
-
bannerView.delegate = nil
|
|
158
|
-
NSLog("AdMob: find subView")
|
|
159
|
-
subView.removeFromSuperview()
|
|
160
|
-
}
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
159
|
|
|
164
|
-
/// Tells the delegate an ad request loaded an ad.
|
|
165
|
-
func bannerViewDidReceiveAd(_ bannerView: BannerView) {
|
|
166
|
-
NSLog("bannerViewDidReceiveAd")
|
|
167
|
-
|
|
168
|
-
self.plugin?.notifyListeners(BannerAdPluginEvents.SizeChanged.rawValue, data: [
|
|
169
|
-
"width": bannerView.frame.width,
|
|
170
|
-
"height": bannerView.frame.height
|
|
171
|
-
])
|
|
172
|
-
self.plugin?.notifyListeners(BannerAdPluginEvents.Loaded.rawValue, data: [:])
|
|
173
|
-
}
|
|
174
|
-
|
|
175
160
|
/// Tells the delegate an ad request failed.
|
|
176
161
|
func bannerView(_ bannerView: BannerView,
|
|
177
162
|
didFailToReceiveAdWithError error: Error) {
|