ld: library not found for -lBolts using cocoapods
I had two problems:
-
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 ofYourApp.xcodeproj
in Xcode.So I had to switch to the new
YourApp.xcworkspace
generated by Cocoapods onpod init
(or whatever generated it). -
The README of
react-native
project doesn't mention that if you have previously added Facebook SDK intoYourApp.xcodeproj
'sFrameworks
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 intoPods
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 adylib
".Eventually, your
Frameworks
folder should have the onlylibPods-YourApp.a
file.Clean, then build the project. It should work.
I just solved this way:
- Delete
Pods
folder andPodfile.lock
- Run
pod install
- On
Pods
project of Xcode, on every pod target, setBuild Active Architecture Only
toNo
- Clean and build again