I followed the custom event example at developers.google.com, but failed to receive ad from the custom ad network with the error in title.
After I requesting the ad for custom event, requestBannerAd:parameter:label:request:
in class CustomAd
did get called. But then (a few seconds later), it jumped to adView:didFailToReceiveAdWithError:
with following error. And my custom network ad request in requestBannerAd:parameter:label:request:
did not work.
Error Domain=com.google.ads Code=9 "Request Error: No ad to show from all configured ad networks." UserInfo=0x1e8e31a0 {NSLocalizedDescription=Request Error: No ad to show from all configured ad networks., NSLocalizedFailureReason=Request Error: No ad to show from all configured ad networks.}
I tries to add [self.delegate customEventBanner:self didReceiveAd:bannerView_];
to requestBannerAd:parameter:label:request:
, and then it works.
My question is:
Am I doing it right? Should I call [self.delegate customEventBanner:self didReceiveAd:bannerView_];
manually from requestBannerAd:parameter:label:request:
, which is not mentioned in the official doc.
And for the custom event ad request which trigger the requestBannerAd:parameter:label:request:
later, should I set gadBannerView_.delegate
for it. When I set it, and later successfully receive custom event (requestBannerAd:parameter:label:request:
get called), why the adView:didFailToReceiveAdWithError
get called but not the adViewDidReceiveAd:
?