问题
SDK version 5.0.4, device has IOS 4.3.2. When building for the simulator, all is fine and the ads load. When changing to 'device', I get 9000+ warnings(!) "unexpected srelocation type 9" when linking the app itself. When run on a device, the app crashes (EXC_BAD_ACCESS
) at the first call in viewDidLoad, [[GADBannerView alloc] initWithFrame]
.
The problem we had was that originally, we used AdWhirl to serve the old AdMob (nee Google Admob) ads. When using the proper non-test AdWhirl account, AdMob ads (only!) would never show up.
I've tried updating AdWhirl and Google Admob in one go, and removing AdWhirl only using the new AdMob. With the latter the behavior is as described above, when used with AdWhirl it crashes a few seconds later when AdWhirl has loaded the ad.
Surely someone else got this, what did you do to solve it?
(Update: on installing it on another Iphone, I strangely got more info than EXC_BAD_ACCESS. It says:
Program received signal: “EXC_BAD_ACCESS”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Can't find dlopen function, so it is not possible to load shared libraries.)
Cannot access memory at address 0x2fdfe8c0
Cannot access memory at address 0x2fdfe8c0
My guess then is that I must make a shared library static (and that it works on the Simulator, because it has dlopen()). How do I do that? )
回答1:
I believe that that with SDK Version 5.0.4, it will only work if you are on the latest version of XCode which is I believe 4.2. Are you on the latest version of XCode?
回答2:
The problem is in the framework libGoogleAdMobAds.a
from GoogleAdMob SDK
.
Use previous version of libGoogleAdMobAds.a
from adMob.com for your Xcode
, not the new one.
After that all 11345 warnings gone and app runs correct on device.
Regards, Papa Buba
来源:https://stackoverflow.com/questions/8123766/google-admob-ads-sdk-only-works-in-simulator