everybody
The problem that I am having is that I can't compile my app because I got the following error:
ld: library not found for -lBolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have my XCode project configured to use cocoapods and this is my list of pods:
pod 'Google/Analytics', '~> 1.0.0'
pod 'AFNetworking', '~> 2.0'
pod 'XCDYouTubeKit', '~> 2.4.0'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Parse'
pod 'ParseUI'
pod 'ParseFacebookUtilsV4'
pod 'ParseTwitterUtils'
This is the output of the command pod install
:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Installing Bolts (1.5.0)
Installing FBSDKCoreKit (4.8.0)
Installing FBSDKLoginKit (4.8.0)
Installing FBSDKShareKit (4.8.0)
Installing Google (1.0.7)
Installing GoogleAnalytics (3.14.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.3)
Installing GoogleUtilities (1.1.0)
Installing Parse (1.10.0)
Installing ParseFacebookUtilsV4 (1.9.1)
Installing ParseTwitterUtils (1.9.1)
Installing ParseUI (1.1.7)
Installing XCDYouTubeKit (2.4.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 10 dependencies from the Podfile and 15 total pods installed.
Things that I have tried:
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 on pod init
(or whatever generated it).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With