GoogleAdMobAds on iphone sdk

In my projects, I imported libGoogleAdMobAds.a and the Adsupport structure. and all header.Linker files as: - -0bjC.Architecture - armv7. Xcode: - 4.5.2 and ios 4.3 and higher.

But still it gives me the error below: -

Undefined symbols for architecture i386: "_CGSizeFromGADAdSize", referenced from: -[BannerExampleViewController viewDidLoad] in BannerExampleViewController.o "_OBJC_CLASS_$_GADBannerView", referenced from: objc-class-ref in BannerExampleViewController.o "_OBJC_CLASS_$_GADRequest", referenced from: objc-class-ref in BannerExampleViewController.o "_kGADAdSizeBanner", referenced from: -[BannerExampleViewController viewDidLoad] in BannerExampleViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 

Can anyone help me how to solve this.

Thanks in advance

+7
source share
4 answers

You must complete two steps:

  • In the build settings, go to the link. In this case, you will find โ€œother linker flagsโ€. Install -Objc for build and release.
  • You will initialize Admob with the specified rectangle. Consider: AbMod = [GADBannerView alloc]initWithFrame:CGRectMake(0,430,320,50)];
+2
source

for those who get this problem see if you are missing this file: libGoogleAdMobAds.a

him solve my problem.

idan m.

+1
source

https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals

Pls check the above url and download the latest google sdk and try

note: you have to add IAD structure to ur project

0
source

I feel this is a build problem for the .a static library. You can find a valid AdBannerView example here . So compare your settings with it. And the documentation is here . I worked on it and worked great.

0
source

All Articles