Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding Xcode build error [duplicate]

Solution: so Mopub's instructions don't mention that EventKit and EventKitUI are required. Adding these in addition to the frameworks mentioned by MoPub got the project to build.

Update: MoPub's instructions have been updated.


I'm integrating MoPub's Full iOS SDK into my app by following their instructions. Unfortunately I get the following build errors after adding their code and required frameworks:

Undefined symbols for architecture i386:

  "_OBJC_CLASS_$_EKAlarm", referenced from:
      objc-class-ref in MRCalendarManager.o
  "_OBJC_CLASS_$_EKEvent", referenced from:
      objc-class-ref in MRCalendarManager.o
  "_OBJC_CLASS_$_EKEventEditViewController", referenced from:
      objc-class-ref in MPInstanceProvider.o
  "_OBJC_CLASS_$_EKEventStore", referenced from:
      objc-class-ref in MPInstanceProvider.o
      objc-class-ref in MRProperty.o
  "_OBJC_CLASS_$_EKRecurrenceDayOfWeek", referenced from:
      objc-class-ref in MRCalendarManager.o
  "_OBJC_CLASS_$_EKRecurrenceEnd", referenced from:
      objc-class-ref in MRCalendarManager.o
  "_OBJC_CLASS_$_EKRecurrenceRule", referenced from:
      objc-class-ref in MRCalendarManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What do these errors mean? I'd like to understand them and then figure out how to fix them on my own. Usually when I add third party ad or analytics SDKs the integration process is very easy. Hence I don't have much experience resolving these types of errors.

Note I tried integrating the MoPub full SDK into my own app and a bare-bones test app. Both give the same errors.

like image 889
SundayMonday Avatar asked Aug 23 '13 04:08

SundayMonday


2 Answers

Add EventKit.framework to your project.

like image 97
Satheesh Avatar answered Sep 19 '22 10:09

Satheesh


When you integrate an external library into your app, it is generally compiled to work with either a simulator or on a device. I believe your .a file was compiled to work on a device, and if you build for a device, your linker should behave better.

Alternatively, you may have just forgotten to include the .a file at all.

like image 42
HalR Avatar answered Sep 21 '22 10:09

HalR