7

After I install facebook sdk, when I build my project, it shows:

ld: warning: directory not found for option '-F/Users/liyuanliu/Library/Developer/Xcode/DerivedData/c5-dsovqtraubbdgxbqrmiexjmlysxq/Build/Products/Debug-iphonesimulator/Bolts'
ld: warning: directory not found for option '-F/Users/liyuanliu/Library/Developer/Xcode/DerivedData/c5-dsovqtraubbdgxbqrmiexjmlysxq/Build/Products/Debug-iphonesimulator/FBSDKCoreKit'
ld: warning: directory not found for option '-F/Users/liyuanliu/Library/Developer/Xcode/DerivedData/c5-dsovqtraubbdgxbqrmiexjmlysxq/Build/Products/Debug-iphonesimulator/FBSDKLoginKit'
ld: warning: directory not found for option '-F/Users/liyuanliu/Library/Developer/Xcode/DerivedData/c5-dsovqtraubbdgxbqrmiexjmlysxq/Build/Products/Debug-iphonesimulator/FBSDKShareKit'
ld: framework not found Bolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But when I install facebook and bolts, it shows I install them successfully:

pod install
Analyzing dependencies
Downloading dependencies
Using Bolts (1.8.4)
Using FBSDKCoreKit (4.14.0)
Using FBSDKLoginKit (4.14.0)
Using FBSDKShareKit (4.14.0)
Using Firebase (3.4.0)
Using FirebaseAnalytics (3.3.0)
Using FirebaseAppIndexing (1.0.4)
Using FirebaseAuth (3.0.4)

Below is my build phases image :

enter image description here

And below cannot find bolts framework image

enter image description here

I cannot find the FBXXXX.framework enter image description here

After I add frameworks, it still exits: enter image description here

Liyuan Liu
  • 105
  • 1
  • 1
  • 6
  • 1
    you should answer your question instead of editing it. Also please change the title to something along the lines : Bolts framework not found [Xcode 7] or stuff to make it more helpful to future readers – Shubhank Aug 04 '16 at 06:40
  • If someone is using Swift 5 and latest FB SDK (FB SDK in Swift version 5.x.x) please check this answer: https://stackoverflow.com/a/56722855/4260691 – OhadM Jun 23 '19 at 10:10

7 Answers7

2

I solved the problem by deleting the ~/Library/Developer/Xcode/DerivedData/xxxx while xcode was closed and then reopened xcode and did a clean + build. All was fixed up when xcode rebuilt the derived data for the project.

zkon
  • 568
  • 1
  • 6
  • 19
1

Please try below steps

  1. From Podfile directory run below commands in terminal

    pod deintegrate

    pod install

  2. Clean Derived Data folder from Xcode
  3. Perform fresh clean build
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
0

Go to Project->TARGETS-Build Phases->Link Binary With Libraries Attach your Bolts library here.

enter image description here

Now click on + button ->enter image description here

Now Click on Add Other.. Button->Find the FBSDK framework on your computer & attach it. Compile & run your application .

Anupam Mishra
  • 3,408
  • 5
  • 35
  • 63
  • Press Command & Space button , it Open Search Bar on mac , Type FBSDK etc. you will get the location of FB framework. Else you can download FB SDK for iOS here - https://developers.facebook.com/docs/ios/ – Anupam Mishra Aug 04 '16 at 06:14
  • I just found another way to solve it, see my updates. But still thanks for your suggestions. – Liyuan Liu Aug 04 '16 at 06:35
0

Finally, I found a solution to solve this problem. In project->targets->build settings->framework search path, there are many paths already existed. I download 4 frameworks(bolts.framework and 3 other FBXXXX.framework) and copy all of them inside one of these existing paths.

enter image description here

enter image description here

enter image description here

Liyuan Liu
  • 105
  • 1
  • 1
  • 6
0

The problem is that the suggestion at https://developers.facebook.com/docs/ios/getting-started of not Deselect Copy items into destination group's folder. is not appropriate on Xcode 8.0, the most popular atm. Dragging the frameworks would move them to the new Frameworks folder.

So follow the tutorial but keep the tick on Copy items into destination group's folder

Jaime Agudo
  • 8,076
  • 4
  • 30
  • 35
0

Finally got solution for them if they are using pod

pod 'FBSDKLoginKit', '4.43.0'


pod 'FBSDKCoreKit', '4.43.0'
iOS Lifee
  • 2,091
  • 23
  • 32
0

Answer on the behalf of the author of the post:

Finally, I found a solution to solve this problem. In project->targets->build settings->framework search path, there are many paths that already existed. I download 4 frameworks (bolts.framework and 3 other FBXXXX.framework) and copy all of them inside one of these existing paths.