React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template
I've found a very similar error reported here, with a solution that suggested:
sudo xcode-select --switch /Applications/Xcode.app
Reading around seems to suggest that somewhere down the updates line, the XCode CLI tools path was set to an incorrect one.
Also as @bibin-jaimon suggested in the comments below, I do have multiple versions of XCode on my machine (why? because of https://stackoverflow.com/a/58329901/606351).
Anyways, problem solved.
How to run CocoaPods on Apple Silicon (M1)
EDIT: I recently disabled Rosetta, and Cocoapods runs just fine with the addition of the ffi gem.
For anyone else struggling with this issue, I just found a way to solve it. In addition to running terminal in Rosetta:
- Right-click on Terminal in Finder
- Get Info
- Open with Rosetta
I installed a gem that seems to be related to the symbol not found in the error:
sudo gem install ffi
After doing this, cocoapods runs as expected.
cocoapods not installing
Using following commands, it worked for me.
sudo gem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods
cocoapods pod install
If you encounter this error on step 2
:
ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)
Then try this as step 2 instead (step 3 is not needed):
gem install -n /usr/local/bin cocoapods
Failing to add pod file to Xcode 13 project
Change the project to Xcode 12.0 compatible. Thanks to https://github.com/CocoaPods/CocoaPods/issues/10713#issuecomment-865145924
Related Topics
How to Add Followed Text to Uitextfield
How to Get Camera Calibration Data on iOS? Aka Avcameracalibrationdata
How to Make Playground Execution Time Is as Fast as If We Run in iOS Application
Xcode 11 Archive Gives Phasescriptexecution Failed
A Simple Code to Detect Any Beacon in Swift
Routing Between Points with Mapbox
Create Hash in Swift Using Key and Message
Uialertcontroller Visible Only When Viewdidappear Has Finished Its Call
Is Weak Self Needed for Table View Cell Button Closure
Scaling Physics Bodies in Xcode Spritekit
How to Deal with Dynamic Sections and Rows in iOS Uitableview
iOS Swift App with More Photos: Performance and Storage Suggestions
Is There Really No Way to Style Sklabelnode
Unrecognized Selector Sent to Instance Swift 3
Creating an Irregular Uibutton in Swift Where Transparent Parts Are Not Tappable
Lineargravityfield() Is Not Affecting Physics Bodies in the Scene Scenekit
Creating a Rtsp Client for Live Audio and Video Broadcasting in Objective C