# STEP 1: Install ffi
sudo arch -x86_64 gem install ffi
# STEP 2: Re-install dependencies
arch -x86_64 pod install
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
# 2022 approach
# Uninstall the local cocoapods gem
sudo gem uninstall cocoapods
# Reinstall cocoapods via Homebrew
brew install cocoapods