Jakub Gawecki
Jakub Gawecki

Reputation: 1239

How to install properly CocoaPods on Macbook M1 Silicon

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

Answers (5)

Harsh Prajapat
Harsh Prajapat

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

  1. https://brew.sh command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  2. https://rvm.io/rvm/install command: \curl -sSL https://get.rvm.io | bash

  3. 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

jkDev 557
jkDev 557

Reputation: 19

This worked for me, you should have homebrew

arch -arm64 brew install cocoapods

Upvotes: 0

RamithDR
RamithDR

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

Matheus Lucas
Matheus Lucas

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

Robert Kaločai
Robert Kaločai

Reputation: 181

For me was the solution through the Homebrew.

  1. Install Homebrew natively on M1 https://docs.brew.sh/Installation#alternative-installs

  2. Then install Cocoapods https://formulae.brew.sh/formula/cocoapods

Upvotes: 4

Related Questions