为什么这不起作用?我首先从链接中安装了FacebookSDK-3.0.8.pkg
:
https://developers.facebook.com/ios/downloads/
安装后,我注意到文件夹是在~/Documents/FacebookSDK/...
我在XC 4.4.1和XC 4.5 B4中打开示例项目,并获取链接器错误:
ld: framework not found FacebookSDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在运行Mountain Lion并且过去能够编译旧的facebook SDK(虽然不是Mountain Lion)。
然后我安装了FacebookSDK-3.0.0.pkg软件包并得到了相同的结果。
修改 这是完整的链接器输出:
Ld /Users/kevinw/Library/Developer/Xcode/DerivedData/HelloFacebookSample-amabhzuzewakecehidtetsnstpuu/Build/Products/Debug-iphonesimulator/HelloFacebookSample.app/HelloFacebookSample normal i386
cd /Users/kevinw/Documents/FacebookSDK/Samples/HelloFacebookSample
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/kevinw/Library/Developer/Xcode/DerivedData/HelloFacebookSample-amabhzuzewakecehidtetsnstpuu/Build/Products/Debug-iphonesimulator -F/Users/kevinw/Library/Developer/Xcode/DerivedData/HelloFacebookSample-amabhzuzewakecehidtetsnstpuu/Build/Products/Debug-iphonesimulator -F/Users/kevinw/Documents/FacebookSDK -F/Users/kevinw/Documents/FacebookSDK -filelist /Users/kevinw/Library/Developer/Xcode/DerivedData/HelloFacebookSample-amabhzuzewakecehidtetsnstpuu/Build/Intermediates/HelloFacebookSample.build/Debug-iphonesimulator/HelloFacebookSample.build/Objects-normal/i386/HelloFacebookSample.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lsqlite3.0 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -weak_framework Accounts -framework UIKit -framework Foundation -framework CoreGraphics -framework FacebookSDK -framework CoreLocation -o /Users/kevinw/Library/Developer/Xcode/DerivedData/HelloFacebookSample-amabhzuzewakecehidtetsnstpuu/Build/Products/Debug-iphonesimulator/HelloFacebookSample.app/HelloFacebookSample
修正!
我解决了我的问题。我安装了3.0.8 SDK and then the 3.0.0 SDK
,试图让事情顺利进行。我终于决定清理平板并擦除我的Documents/FacebookSDK
文件夹和reinstall just the 3.0.0 version
。擦拭/重新安装后,事情开始起作用了!
答案 0 :(得分:4)
我解决了我的问题。我已经安装了3.0.8 SDK和3.0.0 SDK,试图让事情变得有效。我终于决定清理平板并擦除我的Documents / FacebookSDK文件夹并重新安装3.0.0版本。擦拭/重新安装后,事情开始起作用了!