Banner shows in DFP sample app but has "No ad to show." Error in my app

1,000 views
Skip to first unread message

Jarrold Ong

unread,
Jan 21, 2014, 10:03:17 PM1/21/14
to google-adm...@googlegroups.com
Hi,

A few more details about this strange issue.

I'm on iOS7 SDK, Google AdMob Ads SDK 6.5.1 using DFP
I have a production AdUnitId that shows banners on both the iOS sample DFP app and my app with no issue.
I have a test AdUnitId that shows banners only on the sample DFP app. 

On my app I get 2 callbacks:

DFP: adViewDidReceiveAd
DFP: didFailToReceiveAdWithError - Error Domain=com.google.ads Code=1 "Request Error: No ad to show." UserInfo=0xe54e580 {NSLocalizedDescription=Request Error: No ad to show., NSLocalizedFailureReason=Request Error: No ad to show.}

So the strange thing is that I get both callbacks, is this the expected behaviour? I've check the the setup on the DFP dashboard and my production AdUnitId is setup the same way.

I'm stumped. Any guesses why the test AdUnitId is not showing up?

Regards,
Jarrold



Jarrold Ong

unread,
Jan 24, 2014, 2:14:24 AM1/24/14
to google-adm...@googlegroups.com
Just an update, I've been investigating and have the following issues:
  • I've updated to Google AdMob Ads SDK for iOS v 6.7.0
  • Using the sample ios App -  DFPBannerExample project
    • put the viewcontroller in a navigationcontroller during application:didFinishLaunchingWithOptions:
    • give the dfpBannerView_ a background color
    • run the app, the dfpBannerView_ will appear behind the navigationBar
    • move the dfpBannerView_ down by 100px
    • run the app, the dfpBannerView_ will appear below the navigationBar now but the ad will be in a scrollview which you can drag up but only on the blue area. 

Also this is only an issue on iOS7

Eric Leichtenschlag

unread,
Jan 27, 2014, 6:21:43 PM1/27/14
to google-adm...@googlegroups.com
Hi Jarrold,

You should only be getting 1 callback - either the adViewDidReceiveAd or didFailToReceiveAdWithError response. Can you attach a copy of a sample app that has this behavior?

This behavior could be explained if you are changing the banner's frame in the adViewDidReceiveAd callback. Changing the banner's frame will automatically trigger a new ad request, and that may be where your second response is coming from.

As far as the iOS7 issue with the ad showing up behind the navigation bar, I think that's just an issue with how iOS7 lays out views. It takes (0, 0) to be behind the navigation bar.

Thanks,
Eric

sushma nayak

unread,
Jul 9, 2014, 2:37:28 AM7/9/14
to google-adm...@googlegroups.com
" Changing the banner's frame will automatically trigger a new ad request, and that may be where your second response is coming from." This was my problem. Thankyou! it got solved now :)
Reply all
Reply to author
Forward
0 new messages