Reputation: 1239
I am trying to install Cocoa Pods on my new MacBook Pro with the M1 Chip.
There are some solutions that found from December. Since is February those solutions may be a little outdated.
I cannot find any instructions on CocoaPods website. Would anyone be able to help me with that matter? I want to do it right and, sadly, I have little knowledge about that topic.
Many thanks for help.
Upvotes: 9
Views: 27054
Reputation: 41
I have got solution to install CocoaPods on Macbook M1, M2, M3
Follow below steps to install CocoaPods on Macbook M1, M2, M3 Silicon
https://brew.sh command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
https://rvm.io/rvm/install command: \curl -sSL https://get.rvm.io | bash
CocoaPods overview and setup https://kotlinlang.org/docs/native-cocoapods.html
Install Ruby. You can choose a specific version command: rvm install ruby 3.0.0
Install CocoaPods: command: sudo gem install -n /usr/local/bin cocoapods
You can follow steps in sequence one by one =>
command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
command: \curl -sSL https://get.rvm.io | bash
command: rvm install ruby 3.0.0
command: sudo gem install -n /usr/local/bin cocoapods
Upvotes: 0
Reputation: 19
This worked for me, you should have homebrew
arch -arm64 brew install cocoapods
Upvotes: 0
Reputation: 2213
These are the steps I followed :
Install HomeBrew in M1 Mac, open the Rosetta Terminal and run the following command :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After Homebrew installation is done, run this command in the terminal :
brew install cocoapods
Upvotes: 16
Reputation: 51
I have mac Pro M1, Try to run on x86_64 architecture:
sudo arch -x86_64 gem install ffi
Then at the root of your project
arch -x86_64 pod install
Upvotes: 5
Reputation: 181
For me was the solution through the Homebrew.
Install Homebrew natively on M1 https://docs.brew.sh/Installation#alternative-installs
Then install Cocoapods https://formulae.brew.sh/formula/cocoapods
Upvotes: 4