iOS5 - Tapping ads not working

184 views
Skip to first unread message

alexcohen

unread,
Oct 10, 2011, 11:58:32 AM10/10/11
to Google AdMob Ads Developers
Hi,

I'm testing my AdMob integration on iOS 5 and have run into a snag
that is preventing me from releasing. Ad loading is working fine but
as soon as i tap an ad, the status bar goes away and nothing happens.
Its as if something is failing and then leaving it in that state.
HEres the code i use to present it:

GADBannerView* banner = [[GADBannerView alloc] initWithFrame:
v.bounds];
banner.autoresizingMask = UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight;
banner.adUnitID = @"number";
banner.rootViewController = ((AppDelegate*)[UIApplication
sharedApplication].delegate).window.rootViewController;
banner.layer.borderColor = [UIColor colorWithWhite:0.85 alpha:
1].CGColor;
banner.layer.borderWidth = 1;
[v addSubview:banner];

Any ideas what might be going on?

thx

AC

Rajkumar Parameswaran

unread,
Oct 10, 2011, 8:00:47 PM10/10/11
to Google AdMob Ads Developers
We are actually working on building an iOS 5 compatible version of the
SDK and that should be released soon. I'd recommend that you build
your app using that SDK before releasing it.

Another thing you may want to be sure of though is that your
window.rootViewController is pointing to the right view controller
(the top level view controller that will be showing the ad). I noticed
that you're adding the banner to the view v, what's the relationship
between v and your rootViewController?

Raj

Alexander Cohen

unread,
Oct 10, 2011, 8:14:12 PM10/10/11
to google-adm...@googlegroups.com
Thx for the tip. I trip moving up the vc hierarchy to no avail, i still get the same result. Right now, i'm looking into overriding presentModalViewController:animated: on that vc in order to see whats going on.

On another but similar note, is it possible to get the URL that should be loaded into safari ( if thats the case ) so i can show it within my app?

thx

AC

Rajkumar Parameswaran

unread,
Oct 10, 2011, 8:46:13 PM10/10/11
to google-adm...@googlegroups.com
Hmm, I'm not sure of an easy way to scrape for that URL unfortunately (i.e something that doesn't involve looking at the outbound requests or something).

If you call presentModalViewController on your window.rootViewController, are you getting something popping up properly (so for example, if you created a quick little demo view controller and you called [window.rootViewController presentModalViewController: demoViewController] are you getting the right thing?). This is one way you could test out that this issue isn't related to how you're setting the root view controller for your ad.

Raj

Alexander Cohen

unread,
Oct 10, 2011, 8:55:32 PM10/10/11
to google-adm...@googlegroups.com
Yes, that works fine, i can present a couple of other different vc's from the same root controller i'm using for the ad. If this helps at all, i cam calling this from a vc that has already been presented.

AC

Rajkumar Parameswaran

unread,
Oct 11, 2011, 9:25:40 PM10/11/11
to Google AdMob Ads Developers
How are you presenting that vc? Are you presenting it modally using
presentmodalviewcontroller: ? We're looking at an issue similar to
this where the ads don't seem to show when presenting modally but a
quick workaround here would be to use pushViewController: instead of
that if you can.

See this thread:
https://groups.google.com/group/google-admob-ads-sdk/browse_thread/thread/42ebf55ce87dc8a3

Raj

On Oct 10, 5:55 pm, Alexander Cohen <naft...@me.com> wrote:
> Yes, that works fine, i can present a couple of other different vc's from the same root controller i'm using for the ad. If this helps at all, i cam calling this from a vc that has already been presented.
>
> AC
>
> On Oct 10, 2011, at 8:46 PM, Rajkumar Parameswaran wrote:
>
>
>
>
>
>
>
> > Hmm, I'm not sure of an easy way to scrape for that URL unfortunately (i.e something that doesn't involve looking at the outbound requests or something).
>
> > If you call presentModalViewController on your window.rootViewController, are you getting something popping up properly (so for example, if you created a quick little demo view controller and you called [window.rootViewController presentModalViewController: demoViewController] are you getting the right thing?). This is one way you could test out that this issue isn't related to how you're setting the root view controller for your ad.
>
> > Raj
>

Alex Cohen

unread,
Oct 11, 2011, 11:39:19 PM10/11/11
to google-adm...@googlegroups.com, Google AdMob Ads Developers
Nope, I can't push because I'm not in a navigation controller. What would be great is for the delegate to get a callback that lets our code load the external request instead of the sdk handling it internally. Is the sdk open source by any chance?

Sent from my iPad

Rajkumar Parameswaran

unread,
Oct 12, 2011, 7:26:38 PM10/12/11
to Google AdMob Ads Developers
The sdk is not open source unfortunately.

Hmm what happens if you don't set your window.rootViewController (so
if you're setting window.rootViewController, if you were to just
comment out that line or something) but still add the subview to the
window as you do typically?

Raj

On Oct 11, 8:39 pm, Alex Cohen <naft...@me.com> wrote:
> Nope, I can't push because I'm not in a navigation controller. What would be great is for the delegate to get a callback that lets our code load the external request instead of the sdk handling it internally. Is the sdk open source by any chance?
>
> Sent from my iPad
>
> On Oct 11, 2011, at 9:25 PM, Rajkumar Parameswaran <rajp...@google.com> wrote:
>
>
>
>
>
>
>
> > How are you presenting that vc? Are you presenting it modally using
> > presentmodalviewcontroller: ? We're looking at an issue similar to
> > this where the ads don't seem to show when presenting modally but a
> > quick workaround here would be to use pushViewController: instead of
> > that if you can.
>
> > See this thread:
> >https://groups.google.com/group/google-admob-ads-sdk/browse_thread/th...

Alex Cohen

unread,
Oct 12, 2011, 7:39:41 PM10/12/11
to google-adm...@googlegroups.com, Google AdMob Ads Developers
I have not tried, window.rootviewcontroller is important to my app and I can't not set it.

Are the http requests and responses documented anywhere to get ads and respond to clicks, I might need to roll my own.

Sent from my iPhone

Casey Sackett

unread,
Oct 16, 2011, 10:40:46 AM10/16/11
to Google AdMob Ads Developers
I just wanted to chime in on this thread and mention that it's a
problem for us as well ever since iOS5 was released. When a user
presses on an ad, the status bar disappears and the app is frozen.
It's severe enough of a bug that we have turned off all AdMob ads due
to it. Really hope there is an update to the Admob SDK that fixes
it. Nothing in the navigation structure of our app has changed
between iOS4 and iOS5 so it really seems like it should be the
responsibility of the SDK to handle this properly and to intelligently
traverse up any navigation hierarchy that might be necessary.

On Oct 12, 4:39 pm, Alex Cohen <naft...@me.com> wrote:
> I have not tried, window.rootviewcontroller is important to my app and I can't not set it.
>
> Are the http requests and responses documented anywhere to get ads and respond to clicks, I might need to roll my own.
>
> Sent from my iPhone
>

Rajkumar Parameswaran

unread,
Oct 17, 2011, 11:29:36 PM10/17/11
to Google AdMob Ads Developers
@Alex - Unfortunately we don't document those requests as well.

Hmm it feels very hacky but I wonder if you could temporarily nil out
the window's rootViewController in viewWillAppear: for your modal
view, then set it back to the initial view controller in
viewWillDisappear: or something (you could probably temporarily save a
copy to that first root view controller somehow). I don't know if
changing the window's rootViewController like that dynamically will
have weird consequences though. I think the the ad is being presented
on a different view controller right now and is defaulting to the
window's rootViewController.

@Casey - I wonder if this issue is different from Alex's. Are you
saying that your entire app simply hangs after the ad is pressed? I
think in Alex's case, the ad just wasn't being presented but users
could carry on normal functionality in the application. Did I
interpret the issue wrong here however?

We are definitely working hard on an iOS5 compatible SDK though and
we're looking at pushing that out very soon.

Raj

David

unread,
Oct 17, 2011, 11:37:26 PM10/17/11
to google-adm...@googlegroups.com
@Alex

@Casey

Since we have an enormous amount of experience in both issues you appear to be talking about, It would be in your best interest to FURTHER describe your app foundation.

Are you in Unity3d, Sparrow, Cocos2d, UIKit, Mobile Web of UIWebview or how are you building your app. There was horrible horrible problems with openGL prior to 4.1.1 causing screens to go black and failure for the UIWebview controller to AUTODISMISS upon click.

I can tell you right now, we are on XCODE 4.2 in Snow Leopard with IOS5 and we are running with a 100% ad fill rate with a 100% bug free, error free, crash free execution of Admob 4.1.1.

So, that leads us to believe it's operator error on client side and not server side on Admob. In order to get the fine folks of Raj, Eric and the rest of the hard working crew at Admob to help you, take the fog off of your window and give them the foundation of your app and more importantly your view controller hierarchy. This could be your root cause. They can't help you if you don't tell them how your app is built because the chances are more than high that it's your issue. If you're in a cocos2d, you could be running out of memory and not even know it. openGL is a whiney little bitch with the admob SDK if you don't have your textures packed and more importantly aren't running them with RGBA4444 with the Floydstein+Alpha algorithm.

TexturePacker will solve that problem for you and deal with what we found to be "invisible memory" problems that were short circuiting things if you are using any sort of sprites.

Regards

Alexander Cohen

unread,
Oct 18, 2011, 10:10:12 AM10/18/11
to David, google-adm...@googlegroups.com
Here's my project at it's simplest. Took me 30 seconds to put it together and i get the same behavior.

admobfail.zip

Rajkumar Parameswaran

unread,
Oct 19, 2011, 2:05:06 PM10/19/11
to Google AdMob Ads Developers
Thanks for the project Alex. This seems to be a bug with the SDK.

We are fixing the issue and we plan to push that fix into the iOS5
compatible SDK which we will release soon.

Raj

On Oct 18, 7:10 am, Alexander Cohen <naft...@me.com> wrote:
> Here's my project at it's simplest. Took me 30 seconds to put it together and i get the same behavior.
>

>  admobfail.zip
> 2932KViewDownload
>
>
>
> AC

Alexander Cohen

unread,
Oct 19, 2011, 2:27:59 PM10/19/11
to google-adm...@googlegroups.com
thank you. Is there anything i can do in the meantime to get it working>?

AC

Rajkumar Parameswaran

unread,
Oct 19, 2011, 4:12:16 PM10/19/11
to Google AdMob Ads Developers
I'd probably say your best option is to wait for the updated SDK.

I don't see very many clean workarounds that you can do to get around
this. I talked about the temporarily nil'ing out of you
window.rootViewController as one option or trying to change it so you
put your view controller into a navigation controller and push the
view controller from there instead of presenting it modally. Both
those feel very hacky to me though and I don't think I'd recommend
them.

Raj

Reply all
Reply to author
Forward
0 new messages