6

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.

SundayMonday
  • 19,147
  • 29
  • 100
  • 154
  • 2
    Read through the answers to that duplicate. It will explain these linker errors. – rmaddy Aug 23 '13 at 04:58
  • @rmaddy That was definitely helpful! The solution (added to question) was just adding frameworks that MoPub didn't mention. In my opinion this question should be kept open until MoPub's intructions are updated since it could be helpful to other developers. – SundayMonday Aug 23 '13 at 05:06
  • Huh! Wasted 2 hours because of their documentation error :@ It's not updated yet. – jeet.chanchawat May 14 '14 at 05:55

2 Answers2

17

Add EventKit.framework to your project.

Satheesh
  • 10,998
  • 6
  • 50
  • 93
  • There is no problem with `MRCalendarManager`. Please read the error again. It clearly states that the problem is with the missing `EKxxx` symbols being referenced by `MRCalendarManager`. This means the `EventKit` framework needs to be added to the project. – rmaddy Aug 23 '13 at 05:10
  • Ok sorry then add EventKit.framework to ur project. – Satheesh Aug 23 '13 at 05:20
  • Add EventKitUI.framework to your project too. – Tony Sep 18 '13 at 17:33
1

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.

HalR
  • 11,411
  • 5
  • 48
  • 80
  • 1
    Please read the answers in the duplicate question I referenced in the comments. Learning how to read such linker errors is an important skill. – rmaddy Aug 23 '13 at 05:12