Weird "No ads to show" issue using Ads manager

82 views
Skip to first unread message

Julian Meier

unread,
Aug 27, 2019, 11:52:36 AM8/27/19
to Google Mobile Ads SDK Developers
Hi,

I'm using Google Mobile Ads SDK in our iOS application since four years now and for some weird reason the SDK stopped working when I upgraded from Google Mobile Ads SDK 7.36.0 to 7.49.0.
Both my banner view and my interstitial return the following Error:

Error Domain=com.google.admob Code=1 "Request Error: No ad to show." UserInfo={NSLocalizedDescription=Request Error: No ad to show.}

However when testing with the old version of our app ads are being displayed...

I tried replacing the ad unit IDs by the test unit IDs which didn't work. I then ran your ad manager iOS sample which worked for the banner test ID but not for our banner ID.
The info.plist file includes the GADIsAdManagerApp entry. We are using Firebase alongside the GoogleService-info.plist which might interfere with Google Mobile ads SDK?

Thanks for you help! :)

Mobile Ads SDK Forum Advisor Prod

unread,
Aug 27, 2019, 3:53:15 PM8/27/19
to julim...@gmail.com, google-adm...@googlegroups.com
Hello Julian,

Can you please share your Ad unit Ids and complete device logs and Charles logs for us to take a look? You can use "Reply privately to Author" option to share the details privately.

FYI- If you're is using AdMob, you need to add the AdMob app ID in the Info.plist as mentioned in this guide. This step is required as of Google Mobile Ads SDK version 7.42.0 and will return an error if it is not initialized. 

If you're is using Ad Manager, you will need to declare that the app is an Ad Manager app by adding the GADIsAdManagerApp with a boolean value in the Info.plist as mentioned in this guide . This step is required as of Google Mobile Ads SDK version 7.42.0 and will return an error if it is not initialized. 

Let me know if you have any other questions.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
 

ref:_00D1U1174p._5001UHEpX1:ref

Julian Meier

unread,
Aug 28, 2019, 6:51:27 AM8/28/19
to Google Mobile Ads SDK Developers
Hi Deepika,

I sent you the details as a private message. In the meantime I was able to solve the issue myself. The following line of code was responsible for not receiving ads:

UserDefaults.standard.register(defaults: ["UserAgent" : "customUserAgent"])

With this line of code I removed all other user agent details. Now I extend the user agent and everything works just fine:

let userAgent = UIWebView().stringByEvaluatingJavaScript(from: "navigator.userAgent")! + " customUserAgent"
UserDefaults.standard.register(defaults: ["UserAgent" : userAgent])

Thank you for your support!

Regards
Julian
Reply all
Reply to author
Forward
0 new messages