Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined symbols for architecture when add adMob

I'm adding admob to my project, but I get this error:

Undefined symbols for architecture i386:

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

I have added:

StoreKit
AudioToolbox
MessageUI
SystemConfiguration
CoreGraphics
AdSupport

And also use -ObjC link flags..

What is the problem?

Thanks!

like image 328
user3745888 Avatar asked Sep 20 '14 16:09

user3745888


2 Answers

I just upgraded from Google Admob SDK 6.11 to 6.12 and these same errors popped up.

In the project navigator click on your project properties in the top and make sure the correct target is selected. Go to the Build Phases tab and scroll to Link Binaries With Libraries. Add both EventKit.framework and EventKitUI.framework to this list.

As always, Clean and Build your project. The errors should go away.

like image 131
GMBrian Avatar answered Nov 10 '22 14:11

GMBrian


Please check that you have added all those libraries

  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreGraphics
  • CoreTelephony
  • EventKit
  • EventKitUI
  • MessageUI
  • StoreKit
  • SystemConfiguration
like image 20
Aemgtz Avatar answered Nov 10 '22 16:11

Aemgtz