Hi!We develop an app, in which we included AdMob mediation. We have iAd,AdMob and AdFonic networks supported right now.We display ads in several places of the app, sometimes from the top, sometimes from the bottom. So we have custom code, which defines a frame of the ad, when it's displayed. To know real adSize, we use adView.mediatedAdView.frame.size property.Almost every time all ads appear normally from all three networks, however sometimes AdMob ad appears squished in the left corner(although sometimes it appears normally). We checked it's frame on screen when it's bugging and it is ok.({{0, 0}, {768, 66}} to be precise). Are there any known issues with this, or probably we are missing something?Here are the screenshot with correct and wrong behaviour:And here's out custom code to calculate frame, in which the ad should show:CGSize adSize = self.adView.mediatedAdView.frame.size;
showFrame = [self.viewController frameForShowingAd]; //here controller returns frame in which it would like an ad to be displayed, in our case - (0,0; 768,90)
CGRect frame;
frame.origin.x = (showFrame.size.width - adSize.width)/2; // here we center ad on screen
frame.size.width = adSize.width;
frame.size.height = adSize.height;
showFrame = frame;
And then[UIView animateWithDuration:0.7animations: ^{ self.adView.frame = showFrame; }
adView is our GADBannerView object.
Update.When i change requested ad size to use 768*90, like this:adView = [[GADBannerView alloc] initWithAdSize:GADAdSizeFromCGSize(CGSizeMake(768, 90))];
squished ad issue seems to disappear. However, there's textured band added in the left and right of the AdMob ads to compensate it's width. It is seen, when real width of the ad is not 768 but 728.
What solution can be found here? Both behaviours do not seem right.
суббота, 14 июля 2012 г., 3:53:02 UTC+3 пользователь Raj Parameswaran написал:
And by the way simulator also seems to receive ads only from one provider.failed to receive ad with reason: Error Domain=com.google.ads Code=9 "Request Error: No ad to show from all configured ad networks."
Hey Brent,
--
--