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."}
我正在使用MoPub SDK 3.0.0
for iOS。
该文件是否已过时?如何启用测试广告?
注意:
NO
; 答案 0 :(得分:0)
我能看到的,你在做什么似乎没问题。 我建议下载最新版本的MoPub SDK :(此时为3.5.0)