Running 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:

  1. Right-click on Terminal in Finder
  2. Get Info
  3. 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.


Updated on 2021 February

# Install ffi
sudo arch -x86_64 gem install ffi

# Re-install dependency
arch -x86_64 pod install

to install completely cocoapods on Mac with M1 chip (Apple Silicon), please follow those steps:

  1. Duplicate the Terminal application in the Utilities folder.
  2. Right click on the app and choose Get Info.
  3. Rename the other version of the app as you like.
  4. Check the option "open with Rosetta".
  5. Install Cocoapods with the command "sudo gem install cocoapods"
  6. Type the command line "gem install ffi" to fix the ffi bundle problem. Now you can do a "pod install" without problem.

Source : iPhoneSoft