My setup:
There's a UITabBarController
. In the first tab - there's a UINavigationController
with a UITableViewController
as a root viewcontroller.
In the table of UITableViewController
, one of the cells contains a GADBannerView
In the cell with the bannerView, I'm loading the ad like this:
var bannerView: GADBannerView = GADBannerView()
......
bannerView?.adUnitID = "<my adUnitId>"
bannerView?.adSize = kGADAdSizeMediumRectangle
let request = GADRequest()
request.contentURL = "<my site>"
bannerView?.load(request)
Problem:
I've noticed, that if the ad contains the video/animation - after switching between tabs - the CPU usage is still high and remains on 15-20% load forever (until you kill the app).
Actual ad looks like this:
A couple observations:
- if instead of the video-ad - there's a static-image-ad - there's no issue. To me this issue looks like there's some "pause animation" which is not being called for the video-ads.
- happens on both iOS11 and iOS12
func adViewDidReceiveAd(_ bannerView: GADBannerView)
is not being called, i.e. the framework knows that the ad is no longer on the screen
This is how processes look like (after switching to another, ad-free tab):
Version of the AdMob:
'Firebase/AdMob', '~>5.15.0' (from cocoapods)
Any suggestions are very welcomed.