-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Banner ad blank when app returns to foreground sometimes (iOS) #421
Comments
The only change I have made to the example project is adding the latest version of the Google Mobile Ads SDK via Swift Package Manager (11.3.0). The ad unit ID and other IDs come directly from the project. This issue only surfaces on an actual device after some time has passed, enough that the OS puts the app into a “suspended” state. Maybe 30 mins or so, or an hour, depending on usage of the device and other apps (seems somewhat consistent overnight if you open the app just before bed). While it can be challenging to reproduce on demand, as there’s no way to force the “suspended” state, it happens frequently enough with my own apps that I noticed the issue based on normal usage patterns (opening the apps at regular intervals throughout the day). I have also posted this issue in the following forums: |
I've created a smaller example project here as well: https://github.com/lotz/googleads-mobile-ios-example-bug |
Same here. |
@lotz to fix this, is it enough to call |
Calling |
I was not able to replicate this on my end. Can you open a SDK support case and include the debug log and a network trace? |
@NVentimiglia I have already opened a discussion here with a lengthy debug process: https://groups.google.com/u/1/g/google-admob-ads-sdk/c/rwBpqOUr8m8 Reproducing this on demand is difficult, as there is no way to manually trigger the "suspended" state -- it must happen on its on after several hours or even overnight. |
Thanks for your patience, I was able to confirm the issue and confirm that we are working on a solution. |
@NVentimiglia this is great to hear, thanks for the update! |
Hey @NVentimiglia, when do you think we can expect a resolution for this bug? 👀 |
Any updates on this topic, @NVentimiglia? 🙂 |
From the google thread :
I will forward this to engineering to see if there is something we can do such as an error event. That said, In the mean time I recommend reloading banners if the app is suspended. |
I have some iOS apps that implements a banner ad using UIKit. I implement the “
GADBannerViewDelegate
” protocol to listen for ad loading events and errors.Occasionally, when opening the app, returning to the Home Screen on iOS, then returning to the app after some time has passed (possibly enough time for the app to be “suspended” by the OS), the ad banner is blank.
After some view hierarchy debugging, I’ve noticed that the banner ad view utilizes a
WKWebView
to render the ad from a URL. When the ad is blank, it appears that thisWKWebView
’s “url
” property is “nil
”. Additionally, theGADBannerViewDelegate
’s error method is not called, so I don’t know when this has occurred to recover from it.I think this is a bug as it seems to have started happening recently, maybe within the last few months. I have been using Google Mobile Ads in my iOS apps for over 10 years. Any help would be appreciated.
Additionally, I ran the AdMob “BannerExample” project from this repo, installing the latest version of Google Mobile Ads for iOS SDK from Swift Package Manager (11.3.0 at the time of this post), and the issue is present there on iOS 17.4.
The text was updated successfully, but these errors were encountered: