Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

enter image description here

How to fix this? Thanks!

like image 914
Varis Darasirikul Avatar asked Sep 21 '15 08:09

Varis Darasirikul


1 Answers

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)
  1. 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.

like image 126
Gerd Castan Avatar answered Oct 15 '22 15:10

Gerd Castan