How to setup a new M1/M1 Pro/M1 Max MacBook Pro for iOS Development?

December 07, 20213 min read#iOS, #Swift, #MacBook, #M1, #tool, #ruby

I have just got my M1 Max MacBook Pro 14-Inch and it’s beautiful. As an iOS developer, I always feel excited to setup a new development environment on a new laptop.

In this article, I’ll show you some essential tools I’m used to install when setting a new development environment for iOS.

Install Oh My ZSH

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

zsh

Install brew

Running the official installation command:

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

brew will be install in /opt/homebrew folder which is different than what is in Intel-based Mac

==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
==> The following new directories will be created:
/opt/homebrew/bin
/opt/homebrew/etc
/opt/homebrew/include
/opt/homebrew/lib
/opt/homebrew/sbin
/opt/homebrew/share

After finishing installation, you will see a warning

Warning: /opt/homebrew/bin is not in your PATH.
  Instructions on how to configure your shell for Homebrew
  can be found in the 'Next steps' section below.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/antran/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

If you run brew, you will see an error

➜  ~ % brew
zsh: command not found: brew

Run both commands:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/antran/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Now, it should work

➜  ~ % brew doctor
Your system is ready to brew.

Install xcodes

The best command-line tool to install and switch between multiple versions of Xcode.

You can either use the command line version or the app version

xcodes

Install Xcode

xcode


Profile picture

Personal blog by An Tran. I'm focusing on creating useful mobile apps.
#Swift #Kotlin #Mobile #MachineLearning #Minimalist


© An Tran - 2022