Getting `ld: directory not found for option` build error after installing cocoa pod
I realized the issue was that I was still building the .xcodeproj
file as shown below:
xcodebuild build-for-testing
-project ProjectName.xcodeproj
-scheme ProjectName
-destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
-testPlan UnitTests
| xcpretty
But since I was now using cocoa pods in my project, I needed to use the .xcworkspace file
to build it:
xcodebuild build-for-testing
-workspace ProjectName.xcworkspace
-scheme ProjectName
-destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
-testPlan UnitTests
| xcpretty
React native: ios - Library not found for -lbolts
Finally I solved It by change Deployment target version to 12.1 because version are difference between Podfile and Deployment target. Then everything is fine!.
Cocoapods causing library not found and header file not found errors for Xcode Simulator but not device
Update the deployment target and the Podfile 'platform' target. Update both from 9.0 to 11.0. Change this line in your Podfile
platform :ios, '11.0'
and this in both your Target and Project:
ld: library not found for -lRCTAnimation
Can you try to remove all the linked React Native library in Xcode ?
- Open Project.xcworkspace file in Xcode
- Go to project navigator tab
- Go to Build Phases tab
- Then under Link Binary With Libraries section: Remove all binaries -libRCT*
With RN 60+ there are now included in the Pods project.
Related Topics
How to Access Both Objective-C and Swift Classes from Same Storyboard
Button Action in Custom Uitableviewcell Affects Other Cells
Keyboard and Cursor Show, But I Can't Type Inside Uitextfields and Uitextviews
Expand Uilabel Inside Uitableview with "More" Button Like Instagram
Write Extend File Attributes Swift Example
Swift 4 "This Class Is Not Key Value Coding Compliant"
Capture Redirect Url in Wkwebview in iOS
Update the Constant Property of a Constraint Programmatically in Swift
What Does the Text Inside Parentheses in @Interface and @Implementation Directives Mean
How to Convert a Nib-Based Project to a Storyboard-Based
Copy Nsattributedstring in Uipasteboard
Cannot Subscript a Value of Type '[Nsobject:Anyobject]' with an Index of Type 'String'
More Efficient Way to Retrieve Firebase Data
Amazon Aws iOS Sdk: How to List All File Names in a Folder
Negative Number Modulo in Swift
Make Segue Programmatically in Swift