2013-05-08 87 views
3

我正在爲iOS構建一個Phonegap應用程序,我試圖包含Facebook連接框架。Facebook連接Phonegap iOS

我跟所有的https://github.com/phonegap/phonegap-facebook-plugin兩次的步驟,但它一直給以下錯誤:

Undefined symbols for architecture i386: 
"_OBJC_CLASS_$_FBSBJSON", referenced from: 
    objc-class-ref in FacebookConnectPlugin.o 
"_SecRandomCopyBytes", referenced from: 
    +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o) 
    -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o) 
"_kSecRandomDefault", referenced from: 
    +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o) 
    -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o) 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

是否有人知道問題是什麼嗎?

隨着親切的問候

回答

1

這條線:

ld: symbol(s) not found for architecture i386 

意味着編譯器試圖編譯i386的,即適用於Mac OS X.不是架構你想,如果你正在構建一個iOS應用你一定錯過了一個編譯器設置。

+0

這也是一個問題,如果你想運行單元測試。 – Darren 2013-05-14 14:09:48

0

添加cordova.framework到你的包......我認爲這個問題將得到解決