Facebook sdk is not a dylib error after update update Xcode 7?
I got some errors with facebook sdk after update Xcode 7 when i tried to build the project like the code below.
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!
When you install Facebook SDK iOS frameworks the way Facebook advices it, you do two things:
- 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/
You get this "not a dylib" warning when you succeeded with 2. but did not do 1. correctly.
In my case I got this warning for the Bolts.framework, which I didn't use directly but is used by FBSDKCoreKit.framework.
Dragging Bolts.framework into XCode next to FBSDKCoreKit.framework fixed the warning.