capacitor-community / admob

Community plugin for using Google AdMob
MIT License
222 stars 69 forks source link

IOS when banner is loading - app content is not clickable #321

Open ivanov84 opened 6 months ago

ivanov84 commented 6 months ago

Describe the bug Bottom of app is unreachable because google gives response to request ad with delay. My app logic - to request again and bottom screen is unavailable nonstop.

To Reproduce Steps to reproduce the behavior:

  1. VPN to Russia
  2. open app
  3. check bottom of screen

Expected behavior banner does not overlap app bottom buttons while ads is requesting

Screenshots image

Smartphone (please complete the following information):

ivanov84 commented 6 months ago

HOTFIX:

func showBanner(_ call: CAPPluginCall, _ request: GADRequest, _ adUnitID: String)
{
    ....
    self.bannerView = GADBannerView(adSize: bannerSize)
    // IVANOV: HOTFIX
    //self.addBannerViewToView(self.bannerView, adPosition, adMargin)
    self.bannerView.translatesAutoresizingMaskIntoConstraints = false
    self.bannerView.adUnitID = adUnitID
    self.bannerView.rootViewController = plugin?.getRootVC()
    ....
}

and

public func bannerViewDidReceiveAd(_ bannerView: GADBannerView)
{
    ....
    // IVANOV: HOTFIX
    self.addBannerViewToView(bannerView, "BOTTOM_CENTER", 0)
    ....
}