【问题标题】:DFP BannerAd IssueDFP 横幅广告问题
【发布时间】:2018-02-15 19:30:31
【问题描述】:

我在我的 iOS 应用程序中使用 DFP 横幅广告但无法显示 DFP 横幅广告,示例 Ad.Unit.ID = "/6499/example/banner" 以下是源代码

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];

我在 UITableViewCell 自定义类中使用此代码。 两个回调都适用于单个 loadRequest

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

我无法理解这段代码的作用 如果我使用相同的代码,则可以使用

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

但这显示的是 AdMob 而不是 DFP,

我正在使用

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

然后收到以下错误消息

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.}

谁能帮我展示一下 DFP。

【问题讨论】:

    标签: ios google-dfp adbannerview


    【解决方案1】:

    通过更改 DFPBannerView 的大小已修复问题 现在我在 DFPBannerView 中使用 320x50 尺寸

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-26
      • 2020-11-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多