TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

AdMob bannerView not showing after following the docs

Forums > Swift

@BSM  

Hi,

I'm trying to show ads in my app, and I have chosen AdMob. I have done everything as they wrote in the docs.

I added this to the AppDelegate:

GADMobileAds.sharedInstance().start(completionHandler: nil)

I also added this code to the viewDidLoad:

override func viewDidLoad() {
    super.viewDidLoad()
    setUpView()

    adBannerView.adUnitID = "ca-app-pub-3940256099942544/2934735716"
    adBannerView.rootViewController = self
    adBannerView.load(GADRequest())
}

The adBannerView is a UIView in main.storyboard that has GADBannerView as subclass (also, it's connected via @IBOutlet.) But, the ad isn't showing in the simulator. I get this error message every so often (prob when it refreshes)

2020-10-05 19:36:47.683540+0200 Learn Chemistry[38879:1067024] WF: _userSettingsForUser : (null)
2020-10-05 19:36:47.683687+0200 Learn Chemistry[38879:1067024] WF: _WebFilterIsActive returning: NO
2020-10-05 19:36:50.123788+0200 Learn Chemistry[38879:1067024] [Process] 0x7fd3fe019420 - [pageProxyID=31, webPageID=32, PID=39055] WebPageProxy::didFailProvisionalLoadForFrame: frameID = 3, domain = NSURLErrorDomain, code = -1200
2020-10-05 19:36:50.164032+0200 Learn Chemistry[38879:1067024] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}>
2020-10-05 19:36:50.164192+0200 Learn Chemistry[38879:1067024] [ProcessSuspension] 0x147efe1c0 - ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 39055, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}
2020-10-05 19:36:50.174754+0200 Learn Chemistry[38879:1067024] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
2020-10-05 19:36:50.174900+0200 Learn Chemistry[38879:1067024] [ProcessSuspension] 0x147efe240 - ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 39055, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
2020-10-05 19:37:20.127313+0200 Learn Chemistry[38879:1067024] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

Is there anything I did wrong?

thank you.

4      

Having the same problem here - same error messages, same bug.

4      

Having the same error. In my case this happens when I am presenting VStack.sheet(...)

3      

Do you have your GADApplicationIdentifier in your Info.plist ?

https://developers.google.com/admob/ios/quick-start

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.