ld:使用Facebook和Parse找不到架构x86_64的符号

时间:2015-10-17 23:20:47

标签: ios xcode parse-platform cocoapods facebook-sdk-4.0

我在尝试构建项目时不断收到这些错误:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
  objc-class-ref in MESignInViewController.o
  objc-class-ref in MEFacebookLoginManager.o
"_OBJC_CLASS_$_FBSDKAppEvents", referenced from:
  objc-class-ref in AppDelegate.o
 "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
  objc-class-ref in AppDelegate.o
 "_OBJC_CLASS_$_FBSDKGraphRequest", referenced from:
  objc-class-ref in MEFacebookLoginManager.o
 "_OBJC_CLASS_$_FBSDKLoginButton", referenced from:
  objc-class-ref in AppDelegate.o
 "_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
  objc-class-ref in MEFacebookLoginManager.o
 "_OBJC_CLASS_$_PFAnalytics", referenced from:
  objc-class-ref in AppDelegate.o
 "_OBJC_CLASS_$_Parse", referenced from:
  objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已经通过cocoapods安装了Facebook和Parse SDK,这是我的Podfile的样子:

target 'Ment' do
 pod 'Parse'
 pod 'ParseFacebookUtilsV4'
end

target 'MentTests' do

end

知道什么是错的,这真是让我烦恼

1 个答案:

答案 0 :(得分:2)

如果你正在使用facebook登录,我很确定你必须添加facebook pod。

# facebook
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'

并可选择

pod 'FBSDKShareKit'

为了让一切顺利进行,请确保您已遵循instructions parse have for integrating with facebook