6.11.1 version's kGADAdSizeSmartBannerLandscape does not work at iOS8

363 views
Skip to first unread message

doill

unread,
Sep 10, 2014, 1:54:12 PM9/10/14
to google-adm...@googlegroups.com
6.11.1 version' s kGADAdSizeSmartBannerLandscape does not work at iOS8.

The banner has s wrong size 320 x 32 and it shows black only.

Could you please fix it asap?

Thank you in advance~ ^^

Eric Leichtenschlag

unread,
Sep 10, 2014, 5:47:58 PM9/10/14
to google-adm...@googlegroups.com
I can't reproduce this. I ran it on iPhone 6 and iPhone 6 plus simulator using the new Xcode 6 GM build.

Can you post your code, or a sample project that reproduces the issue?

doill

unread,
Sep 10, 2014, 9:56:20 PM9/10/14
to google-adm...@googlegroups.com
- (void)viewDidLayoutSubviews
{
        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
        if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
        {
            self.admobBanner.adSize = kGADAdSizeSmartBannerLandscape;
        }
        else
        {
            self.admobBanner.adSize = kGADAdSizeSmartBannerPortrait;
        }
        NSLog(@"%.f %.f", self.admobBanner.frame.size.width, self.admobBanner.frame.size.height);

        CGRect adFrame = self.admobBanner.frame;
        adFrame.origin.y = newY;
        self.admobBanner.frame = adFrame;
}

After assigning adSize =  kGADAdSizeSmartBannerLandscape, admobBanner.frame.size.width has a wrong value 320 even though it should be 480 or wider values based on iPhone model.

Could you please fix it asap?

2014년 9월 11일 목요일 오전 6시 47분 58초 UTC+9, Eric Leichtenschlag 님의 말:

doill

unread,
Sep 10, 2014, 10:13:18 PM9/10/14
to google-adm...@googlegroups.com
I forgot to mention that this problem occurs when you rotate your iPhone or iPhone Simulator to landscape.

2014년 9월 11일 목요일 오전 10시 56분 20초 UTC+9, doill 님의 말:

Eric Leichtenschlag

unread,
Sep 12, 2014, 2:56:41 AM9/12/14
to google-adm...@googlegroups.com
Shoot, you're right. I've filed a bug and set it as high priority.

Thanks,
Eric

Eric Leichtenschlag

unread,
Sep 18, 2014, 7:26:13 PM9/18/14
to google-adm...@googlegroups.com
The latest SDK has a fix for this issue. You can grab the update at https://developers.google.com/mobile-ads-sdk/download.

Thanks,
Eric

Alexey

unread,
Sep 23, 2014, 6:54:16 AM9/23/14
to google-adm...@googlegroups.com
Still has invalid height CGSizeFromGADAdSize(kGADAdSizeSmartBannerLandscape).height = 32 (instead of 50) when app is started in landscape mode (if started in portrait and then rotated to landscape - everything is working as expected)

PAHeartBeat

unread,
Sep 23, 2014, 9:01:32 AM9/23/14
to google-adm...@googlegroups.com
Hi Alexey, 

AdMob iOS SDK 6.11.1 mostly not show Ads with iOS 8, we have just update it to 6.12.0 after that it's work fine with native iOS App. One thing more may be your screen size will be change when your device roated in iOS 8 with Base SDK iOS 8.0 check this link http://stackoverflow.com/questions/24150359/is-uiscreen-mainscreen-bounds-size-becoming-orientation-dependent-in-ios8, with base SDK iOS 8, when you rotate your device your height become width and width became height. it's change by apple in iOS 8 SDK.

Due to to this you width may be became invalid when your roated your device from landscape to portait mode.

I am not sure it's will also happen if you select iOS 7 as base SDK and trying to run app over iOS 8

Eric Leichtenschlag

unread,
Sep 24, 2014, 4:14:51 PM9/24/14
to google-adm...@googlegroups.com
@Alexey,

CGSizeFromGADAdSize(kGADAdSizeSmartBannerLandscape).height should be 32, even if this is queried from portrait mode. You should only be using kGADAdSizeSmartBannerLandscape in landscape mode anyways, and listen for orientation changes to set adSize to kGADAdSizeSmartBannerPortrait when transitioning back to portrait mode.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages