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?
I finally received a response from AdMob support:
This isn't a known issue and we don't currently have a workaround. ... We'll investigate this on our end for future releases of the SDK to see if it's an error we can address.
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!
精彩评论