AdMob 错误:广告尺寸必须至少为 728x90
我正在将 AdWhirl 集成到我的 iPad 应用程序中。 AdMob 帮助网站称其平板电脑广告的尺寸包括 728x90 (http://helpcenter.admob.com/node/423/)。当我向 AdMob 提出请求(通过 AdWhirl)时,我请求的广告尺寸为 728x90。 AdWhirl 不支持这种开箱即用的广告尺寸,但对 AdWhirl 的 AdMob 适配器进行的一个小更改允许此请求:
- (void) getAd {
// Request the right size ad for your device
CGSize adSize = ADMOB_SIZE_320x48;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
adSize = CGSizeMake(728, 90);
}
AdMobView *adMobView = [AdMobView requestAdOfSize:adSize withDelegate:self];
self.adNetworkView = adMobView;
}
我处于测试模式,因此我收到的所有广告都是测试广告。大多数时候,我收到的广告尺寸为 728x90,广告显示正常,一切都很棒。
但是,在一小部分情况下,我会在控制台中收到此错误消息:
<AdMob> Ad must be at least 728x90 (it is 728x90 pixels).
发生这种情况时,AdWhirlView 中的现有广告会消失,并且 UI 中会留下一个很大的空白,应该用广告填充。从错误消息中可以清楚地看出,有些东西有问题,因为它承认尺寸正是它想要的尺寸。
知道是什么原因导致此错误消息吗?有什么想法如何预防吗?如果没有,有什么想法如何捕获它,以便我至少可以调整我的 UI 来优雅地处理错误?
I'm integrating AdWhirl into my iPad app. The AdMob help site says the sizes of their tablet ads includes 728x90 (http://helpcenter.admob.com/node/423/). When I make my request to AdMob (via AdWhirl) I request ads that are 728x90. AdWhirl doesn't support this ad size out of the box, but a small change to AdWhirl's AdMob adapter allows this request:
- (void) getAd {
// Request the right size ad for your device
CGSize adSize = ADMOB_SIZE_320x48;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
adSize = CGSizeMake(728, 90);
}
AdMobView *adMobView = [AdMobView requestAdOfSize:adSize withDelegate:self];
self.adNetworkView = adMobView;
}
I'm in test mode, so all of the ads I get back are test ads. Most of the time I get back an ad that is 728x90, the ad displays properly and everything is great.
However, a small percentage of the time, I get this error message in my console:
<AdMob> Ad must be at least 728x90 (it is 728x90 pixels).
When this happens the existing ad in my AdWhirlView disappears and I'm left with a large gap in my UI that should be filled with an ad. It is clear to me from the error message that something is buggy because it admits that the size is exactly the size that it wants.
Any idea what is causing this error message? Any ideas how to prevent it? If not, any ideas how to catch it so that I can at least adjust my UI to handle the error elegantly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于收到了 AdMob 支持人员的回复:
我已经向他们提供了一些额外的信息,但目前还没有解决方案。但是,如果您找到了解决方法,那么我洗耳恭听!
I finally received a response from AdMob support:
I've provided them with some extra information, but as for now there isn't a solution. However, if you've figured out a workaround, then I'm all ears!