How to Run CocoaPods on Apple Silicon and MacOS Big Sur (Developer Transition Kit, DTK) in 3 easy steps
If you run into an issue with running Cocoapods on Apple Developer Transition Kit, this easy fix worked for me.
- Locate Terminal.app in Finder. (Applications->Terminal.app)
- Right-click and choose Get Info
- Check the “Open using Rosetta”
- Quit all instances of Terminal app and run it again
- Run sudo gem install ffi
- Run pod install 🎉
Thanks a lot, https://github.com/mskrischke for pointing this out in https://github.com/CocoaPods/CocoaPods/issues/9890#issuecomment-652407397. Saved me a couple of hours at least :)
UPDATE 1: If Terminal is not opening after setting the “Open using Rosetta” checkbox, please restart the macbook
UPDATE 2: If this method is not working for you, please check this GitHub thread for other options https://github.com/CocoaPods/CocoaPods/issues/9907
UPDATE 3: Added step for `sudo gem install ffi`
UPDATE 4:
ethon 0.13.0 was released 🎉. Now to use CocoaPods without going through Rosetta, you should not need any modification to your Gemfile anymore (and if you did one of the modifications above you should remove it). Just make sure ethon is at least v0.13.0 and ffi is at least 1.15.0. bundle update ffi ethon should update your Gemfile.lock and do the trick.
Source https://github.com/CocoaPods/CocoaPods/issues/9907#issuecomment-817394413
Other stories
Run Rosetta Simulator on Xcode 14.3