41

I've downloaded the newest version of googles admob sdk. But now I keep getting the following error when compiling in xcode 4.5 with the latest sdk.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea on what could be wrong?

Øystein
  • 1,163
  • 1
  • 12
  • 23

3 Answers3

181

You probably didn't add AdSupport.framework. Also remember to remove -all_load linker flag.

Monolo
  • 18,205
  • 17
  • 69
  • 103
Deor
  • 1,891
  • 1
  • 12
  • 7
  • where do we find all_load flag – Ilker Baltaci Sep 28 '12 at 14:16
  • 3
    The "-all_load" can be found under "build settings" on your project or target. Open the settings and search for "other linking flags". If it is set you will find it there (note that this is not a default flag, so it may not be there) – Øystein Sep 28 '12 at 15:45
  • Add the AdSupport.framework in your target 'Link Binary With Libraries' – Nathan Hangen Oct 31 '12 at 12:15
  • Hint: The AdSupport.framework is a system framework provided by Apple, add it to Target > Build Phases > Link ... – cat Dec 02 '12 at 11:50
  • 2
    Note: I had to add StoreKit.framework as well (may be because I'm using the DoubleClick addon headers?). – thomers Feb 25 '13 at 20:06
  • I was also facing exact problem, and got it solved by adding the suggested framework. Thanks.:) – Ashutosh May 31 '13 at 06:57
  • I had this issue when removing a cordova plugin that used `AdSupport.framework` but another plugin still needed it. Worked for me :) – Deminetix May 12 '15 at 01:33
  • I have added AdSupport.framework and have removed `-all_load` flag. but still I am getting this error for Fyber SDK. – iBug Jun 18 '15 at 09:37
9

AdSupport.framework need in xcode 4.5 and admob 6.x

zszen
  • 1,428
  • 1
  • 14
  • 18
1

On the other way you can fix it without adding extra framework, remove the "-Obj" flag from "Linking > Other Linker Flags" if this flag is not required for your project.

I my case it was different, I had supported the GoogleConvertionTracking.lib but after couple of release customer decided to remove the GoogleConvertionTracking.lib from client. After removing all required code from client I started getting this error of ""_OBJC_CLASS_$_ASIdentifierManager", referenced from:"

After going thru the support doc of GoogleConvertionTracking I found that I had added "-Obj" compiler flag under Under Linking > Other Linker Flags.

* by removing this "-Obj" flag from "Linking > Other Linker Flags" for both rel/deb this error is gone.

I don't have to add AddSupport.framework to get rid of this error. This change may be helpful for those who don't want to add extra framework to avoid the compilation error.

mask
  • 6,172
  • 3
  • 24
  • 23