14

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!

Varis Darasirikul
  • 3,013
  • 5
  • 25
  • 35
  • 5
    Add them into 'Link Binary With Libraries' under 'Build Phases' – Arbitur Oct 06 '15 at 13:53
  • I had this error when integrating the frameworks in an Xcode sub-project then trying to use calls in the host project. Linking against the Facebook framework in the parent project corrected this. – Rob Segal Oct 09 '15 at 20:50

1 Answers1

24

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.

Gerd Castan
  • 6,275
  • 3
  • 44
  • 89
  • 3
    What's the proper way to create a "Frameworks" group. I tried adding a group from the File > New dropdown menu and then dragging and dropping the frameworks, but that didn't seem to work for me. So, I used these instructions: http://docs.onemobilesdk.aol.com/ios-ad-sdk/adding-frameworks-xcode.html – chez.mosey Oct 04 '17 at 11:41
  • 1
    @chez.mosey, another way to create the Frameworks group is to right click the top level app icon in the "folder/tree view" on the left panel of XCode. Then select "New Group". When you drag *.framework files into this group a *.framework entry is added to Build Phases - Link Binary With Libraries. – Joshua Dyck Nov 06 '17 at 22:50