This solution work like a charm for me. I had new mac book pro with M1 chip.
Are you using an Macbook M1? Or an Intel Macbook?
If you are using an Intel macbook ...
$sudo gem install cocoapods
move to your folder run pod init
open your Podfile and add your targets
Close Podfile
type pod install
type pod update
Open MyPod.xcworkspace and start working
if you are using M1 Mb do the same but start with
Right click on Terminal
Get Info -> Open with Rosetta
Open terminal and type sudo gem install ffi
Then do the steps above.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: