gpt4 book ai didi

ios - 无法在测试模式下请求广告

转载 作者:可可西里 更新时间:2023-11-01 06:14:48 26 4
gpt4 key购买 nike

MPAdView.h 中的文档说:

/** @name Enabling Test Mode */

/**
* A Boolean value that determines whether the ad view should request ads in test mode.
*
* The default value is NO.
* @warning **Important**: If you set this value to YES, make sure to reset it to NO before
* submitting your application to the App Store.
*/
@property (nonatomic, assign, getter = isTesting) BOOL testing;

但是当使用描述的测试模式请求横幅时:

self.adView = [[MPAdView alloc] initWithAdUnitId:self.adUnitID size:self.size];
self.adView.delegate = self;
self.adView.testing = YES;
[self.adView loadAd];

没有返回广告:

MOPUB: Banner view (7e99efe0cd814f9d8c946ff530aa9900) failed. Error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0x167eeef0 {NSErrorFailingURLStringKey=http://testing.ads.mopub.com/m/ad?v=8&udid=ifa:XXXX&id=7e99efe0cd814f9d8c946ff530aa9900&nv=2.4.0&o=l&sc=2.0&z=-0200&mr=1&ct=2&av=1.5&cn=TIM&iso=&mnc=&mcc=&dn=iPhone3%2C1&ts=1, NSErrorFailingURLKey=http://testing.ads.mopub.com/m/ad?v=8&udid=ifa:XXXX&id=7e99efe0cd814f9d8c946ff530aa9900&nv=2.4.0&o=l&sc=2.0&z=-0200&mr=1&ct=2&av=1.5&cn=TIM&iso=&mnc=&mcc=&dn=iPhone3%2C1&ts=1, NSLocalizedDescription=A server with the specified hostname could not be found., NSUnderlyingError=0x167db490 "A server with the specified hostname could not be found."}

我正在使用适用于 iOS 的 MoPub SDK 3.0.0

该文档是否已过时?如何启用测试广告?

注意事项:

  • 我的互联网连接正常;
  • 当测试模式等于NO时,我能够展示广告;

最佳答案

就我所见,您所做的似乎还不错。我建议下载最新版本的 MoPub SDK:(目前为 3.5.0)

https://github.com/mopub/mopub-ios-sdk/

关于ios - 无法在测试模式下请求广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26689474/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com