How to get kGADAdSizeSmartBannerPortrait to work


I cannot get kGADAdSizeSmartBannerPortrait to work.

Expected: On iPhone 6 Plus, the width of a banner should be 414 points. On iPhone 6, the width of a banner should be 375 points. On other iPhones and iPods ad this point, the banner would be 320 points.

Actual outcome: I see the "320x50 Test Banner" on all devices. On wide devices, the 320x50 banner is centered in the view. The remaining space to the left and to the right has a grayish pattern.

Actual code used:

GADBannerView* newbanner = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait];
NSLog(@"newbanner size: %@", NSStringFromCGSize(newbanner.frame.size));
newbanner.adUnitID = @"/6499/example/banner";
newbanner.rootViewController = self;
GADRequest *request = [GADRequest request];
request.testDevices = @[
                        @"somedeviceid1",
                        @"somedeviceid2",
                        ];
[newbanner loadRequest:request];
[self.view addSubview:newbanner];
newbanner.center = CGPointMake(self.view.frame.size.width * 0.5, self.view.frame.size.height * 0.5);

iPhone 6 Plus screenshot:

iPhone 6 Plus screenshot of admob incorrectly sized smart banner ad.


Answers:


The kGADAdSizeSmartBannerPortrait only works on Android (and even there it's not perfect) for iOS I used kGADAdSizeBanner and in the control panel when providing a "Creative" (a.k.a image) for the ad make sure to also add retina version of the ad with 2x density.

enter image description here