【问题标题】:Objective C - Apple Mach - O Linker Error目标 C - Apple Mach - O 链接器错误
【发布时间】:2014-03-25 23:40:30
【问题描述】:

我正在为我的移动应用项目使用社交分享 phonegap 插件。我在构建项目时遇到了这个问题。我有几个错误。我正在使用这个 phonegap 插件来实现我的社交分享功能。检查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)

为什么?

【问题讨论】:

  • 你添加了 Social.framework 吗?
  • 您可能缺少框架。尝试添加 Message/MessageUI/Social 框架

标签: ios cordova linker xcode5 phonegap-plugins


【解决方案1】:

使用以下步骤添加框架作品:

  1. 在项目导航器中,选择您的项目
  2. 选择您的目标
  3. 选择“构建阶段”选项卡
  4. 打开“使用库链接二进制文件”扩展器
  5. 点击“+”按钮
  6. 选择框架(MessageUI.frameworkSocial.framework 在您的情况下)

【讨论】:

    【解决方案2】:

    我也遇到了同样的问题,我按照这里提到的步骤操作: https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/116

    所以,基本上我删除了平台: cordova platform remove ios

    然后添加回来: cordova platform add ios

    希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-07
      • 2014-04-06
      • 2023-03-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多