The fastest and easy way to install Cocoapods in MacOs (Tested in High Sierra, Mojave, Catalina & Big Sur)

Ing. Alejandro Villalón
Villalon Engineering
1 min readNov 22, 2020

--

I browsed on the internet, and I found in several websites the most recommendable command:

sudo gem install cocoapods

But it didn’t work, so I continued browsing, and I found some people made it works with:

sudo gem install -n /usr/local/bin cocoapods

But it didn’t work for me either.

So, I returned to continue with my search. I wasn’t going to stop until I achieved it, And I did it! After wasting several hours trying and trying different commands unsuccessfully.

I’m writing this post to save you some hours looking for a solution to install cocoapods in your Mac and remind me in the future of The fastest and easy way to install Cocoapods in MacOs.

The trick is using Brew:

brew install cocoapods

With that, cocoapods is installed in your Mac, but that is not to all. The final step is to disperse the pod command to the entire command line, and we do with:

brew link cocoapods

And that’s it! Now you can use:

pod --version

--

--

Ing. Alejandro Villalón
Villalon Engineering

Computer engineer specializing in the App Development process. Founder of Villalón Engineering, a community where ideas materialize.