Search code examples
ioscordovalinkerxcode5phonegap-plugins

Objective C - Apple Mach - O Linker Error


I'm using social sharing phonegap plugin for my mobile app project. I got this problem when build the project. I got a several of error. I'm using this phonegap plugin for my social sharing function. Check https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.

Undefined symbols for architecture armv7s:
  "_SLServiceTypeTwitter", referenced from:
      -[SocialSharing shareViaTwitter:] in SocialSharing.o
  "_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
      objc-class-ref in SocialSharing.o
  "_SLServiceTypeFacebook", referenced from:
      -[SocialSharing shareViaFacebook:] in SocialSharing.o
  "_OBJC_CLASS_$_SLComposeViewController", referenced from:
      objc-class-ref in SocialSharing.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why?


Solution

  • Add the frame works by using the following steps:

    1. In the project navigator, select your project
    2. Select your target
    3. Select the 'Build Phases' tab
    4. Open 'Link Binaries With Libraries' expander
    5. Click the '+' button
    6. Select framework (MessageUI.framework and Social.framework in your case)