views:

279

answers:

1

This crashes (but without outputting any info to the Debugger; no dump, no trace):

adMobAd = [AdMobView requestAdWithDelegate:self]; // start a new ad request
[adMobAd retain]; // this will be released when it loads (or fails to load)

I thought it was because my code isn't executing in NSDefaultRunLoopMode, which AdMob says is required for +requestAdWithDelegate:. Unfortunately, it fails even if I run the selector later, when my app IS in NSDefaultRunLoopMode. So I'm still not sure why this is crashing.

I output [[NSRunLoop currentRunLoop] currentMode] to the Debugger console, and found that it's "GSEventReceiveRunLoopMode".

What is GSEventReceiveRunLoopMode?

This happens whether I load AdViewController from a nib (.xib file) or create (alloc/init) it in code.

A: 

I fixed it. I was building with the 3.0 SDK, and I also tried the 3.1 SDK, and the crash occurred under both. The solution was to use the 3.0-compatible libraries in the extras/ directory. These files are called libAdMobDevice3_0.a and libAdMobSimulator3_0.a.

Bonus points if anyone can tell me why the old AdMob libraries crash under the 3.0+ SDK, with no info about the crash given by Xcode. Or, if you know why AdMob actually needs to provide two different libraries for 2.0 vs 3.0 to begin with.

Elliot
@Eliot, have you found the answers for your questions? I have a similar issue now. If I build the project for 2.2.1 OS version, will it run on a 3.x device? Thank you.
Michael Kessler
Yes and yes. The 2.2.1 version (as far as I can tell) works on 3.x devices, but not on the 3.x Simulators.
Elliot