iosgoogle-dfpadbannerview

DFP BannerAd Issue


I am using DFP Banner Ad with my iOS application But unable to display DFP Banner Ad with example Ad.Unit.ID = "/6499/example/banner" following is the source code

self.detail_dfp_bannerview.delegate = self;
self.detail_dfp_bannerview.adUnitID = @"/6499/example/banner";
self.detail_dfp_bannerview.adSize = kGADAdSizeBanner;
self.detail_dfp_bannerview.rootViewController = VC;
DFPRequest* req = [DFPRequest request];
req.testDevices = @[@"xxxxxx9b85b85exxxxxxe3b8caxxxxxx"];
[self.detail_dfp_bannerview loadRequest:req];

I am using this code in UITableViewCell custom class. Both callback is working for a single loadRequest

(1) - (void)adViewDidReceiveAd:(GADBannerView *)adView {}
(2) - (void)adView:(GADBannerView *)adViewdidFailToReceiveAdWithError:(GADRequestError *)error{}

I am not able to understand what is work with this code Same code is working if i used

self.detail_dfp_bannerview.adUnitID = @"ca-app-pub-xxxxxx6099942544/2934xxxxxx";

But this is displaying AdMob not DFP,

I am using

self.bnrAd.adUnitID = @"/6499/example/banner";

then getting following error message

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

Can any one please help me to display DFP.


Solution

  • By changing Size of DFPBannerView issue fixed Now i am using 320x50 size with DFPBannerView