ld: library not found for -lBolts using cocoapods

I had two problems:

  1. The first problem was that I was building my original YourApp.xcodeproj Xcode project file.

    According to react-native:

    From now on open YourApp.xcworkspace instead of YourApp.xcodeproj in Xcode.

    So I had to switch to the new YourApp.xcworkspace generated by Cocoapods on pod init (or whatever generated it).

  2. The README of react-native project doesn't mention that if you have previously added Facebook SDK into YourApp.xcodeproj's Frameworks folder according to the step 4. Add the SDK to your Xcode Project of Facebook SDK for iOS - Getting Started tutorial, then you should remove those references, because Cocoapods will pull the FB SDK code into Pods folder, so you no longer need to reference FB SDK separately. Otherwise, Xcode tries to build according to the settings and instructions of the Cocoapods, but finds FB SDK which has binaries that are "not a dylib".

    Eventually, your Frameworks folder should have the only libPods-YourApp.a file.

    Clean, then build the project. It should work.


I just solved this way:

  • Delete Pods folder and Podfile.lock
  • Run pod install
  • On Pods project of Xcode, on every pod target, set Build Active Architecture Only to No
  • Clean and build again