CODEX

Simple way to use Cocoapods on M1

Doyeon
CodeX
Published in
3 min readMar 16, 2021

--

I recently bought a Macbook Pro M1 and still without any regrets! yeey! 🙌🏻 I was a bit worried about app compatibility with other software that is not ready for M1 but almost every app that I’m using is perfectly working well.

But, if you are an iOS developer and trying to work with Cocoapods on xcode, that might be a problem and give you a panic when there’s tons of errors popping up but don’t worry! Here’s the simplest way to do it!

1️⃣ Look for terminal in Finder

2️⃣ Right click the terminal and click “get info”, then check “Open using Rosetta” under the General menu.

Okay, We have to use Rosetta translation technology in order for us to run!

Rosetta is an emulator designed to bridge the transition between Intel and Apple Processors. In other words, Rosetta translates apps built for Intel to Apple Silicon.

3️⃣ Open the terminal, and type sudo gem install ffi

4️⃣ then install cocoapods sudo gem install cocoapods

5️⃣ blah blah blah.. after installing cocoapods, uncheck the box Open using Rosetta in “get info”. it works just fine ✌🏻

6️⃣ Go to your project directory and do USUAL!

  1. pod init
  2. open Podfile
  3. edit Podfile (add pods)
  4. pod install
  5. open .xcworkspace to enjoy 😁

Then you’ll see everything successfully installed! Thank you for reading and this post might help some of M1 users like me 🍎

--

--

Doyeon
CodeX

Passionate iOS developer creating extraordinary apps. Innovative, elegant, and collaborative. Constantly pushing boundaries.Let's build the future together📱✨🚀