更新更新 Xcode 7 后,Facebook sdk 不是 dylib 错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32690590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Facebook sdk is not a dylib error after update update Xcode 7?
提问by Varis Darasirikul
I got some errors with facebook sdk after update Xcode 7 when i tried to build the project like the code below.
当我尝试像下面的代码一样构建项目时,在更新 Xcode 7 后,我在使用 facebook sdk 时遇到了一些错误。
ld: warning: Auto-Linking supplied '/Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKShareKit.framework/FBSDKShareKit', framework linker option at /Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKShareKit.framework/FBSDKShareKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit', framework linker option at /Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKCoreKit.framework/FBSDKCoreKit is not a dylib
ld: warning: Auto-Linking supplied '/Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit', framework linker option at /Users/manjarb/Desktop/hubbalabs/lib/FacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit is not a dylib
How to fix this? Thanks!
如何解决这个问题?谢谢!
回答by Gerd Castan
When you install Facebook SDK iOS frameworks the way Facebook advices it, you do two things:
当您按照 Facebook 建议的方式安装 Facebook SDK iOS 框架时,您需要做两件事:
- create a "Frameworks" group in XCode if it doesn't exist
- drag used frameworks into the "Frameworks" group (this automagically creates an entry in Build Phases -> Link Binary With Libraries)
Set the Framework search Paths to .../FacebookSDKs-iOS/
- 如果它不存在,则在 XCode 中创建一个“框架”组
- 将使用过的框架拖到“Frameworks”组中(这会自动在 Build Phases -> Link Binary With Libraries 中创建一个条目)
将框架搜索路径设置为 .../FacebookSDKs-iOS/
You get this "not a dylib" warning when you succeeded with 2. but did not do 1. correctly.
当您成功执行 2. 但没有正确执行 1. 时,您会收到此“不是 dylib”警告。
In my case I got this warning for the Bolts.framework
, which I didn't use directly but is used by FBSDKCoreKit.framework
.
就我而言,我收到了针对 的警告Bolts.framework
,我没有直接使用它,而是由FBSDKCoreKit.framework
.
Dragging Bolts.framework
into XCode next to FBSDKCoreKit.framework
fixed the warning.
拖动Bolts.framework
到 XCode 旁边FBSDKCoreKit.framework
修复警告。