If you have any issues with macOS, or need anything related to it check this documentation
Install Xcode Command Line tools :
xcode-select --install
Nothing else to do.
Install Rosetta :
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Install FFI
arch -arm64 sudo gem install ffi
Install HomeBrew
## Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If you need to remove it, to make a clean install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
To install Homebrew on M1 Apple :
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add this alias to .zshrc
alias brew="arch -arm64 brew"
Add HomeBrew to Your Path
HBP=`brew --prefix`
export PATH=$HBP/bin:$PATH
Usefull CLI
## Check that everything is Ok
brew doctor
## To update HomeBrew
brew update
## To update/upgrade a brew package just run :
brew reinstall PACKAGE_NAME
Install iTerm
brew install --cask iterm2
Install ZSH
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Clone the following repository and follow the described steps zshconfig
(The above tool is fully automated and available for Intel & M1 Mac)
## Install Power10k :
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
### change ZSH_THEME to : ZSH_THEME="powerlevel10k/powerlevel10k"
### then run :
p10k configure
## Install Auto-Suggestion :
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
### Edit .zshrc & add in plugins array : zsh-autosuggestions
## Install Syntaxe Hylight :
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
### Edit .zshrc & add in plugins array : zsh-syntax-highlighting
## Install Completion :
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
### Edit .zshrc & add this line before source $ZSH/oh-my-zsh.sh
#### fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
## Install History substring :
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
### Edit .zshrc & add this line before source $ZSH/oh-my-zsh.sh
#### fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-history-substring-search/src
Don't forget to import Meslo Font into iTerm -> Preferences -> Profiles -> "Selected Profile" -> Text -> Font -> Select the Meslo font you want to use.
My P10k config Options :
- Rainbow
- Unicode
- 24H
- Flat
- Flat
- 2 lines
- Dotted
- Right
- Darkest
- Sparse
- Concise
- No
- Verbose
- Overright
- No (.zshrc)
brew install subversion
Install Repo
brew install repo
Install Git
brew install git
brew install git-lfs
Install Git Flow
brew install git-flow
Install Sublime Text
brew install --cask sublime-text
Install Fork (Recommended)
brew install --cask fork
# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts && ./install.sh
# clean-up a bit
cd .. && rm -rf fonts
Install VsCode
brew install --cask visual-studio-code
How to use iTerm + PowerLvl10k in Vscode :
(I assume here you already followed steps decribed in section Install ZSH)
Edit this Vscode User Settings file /Users/$(whoami)/Library/Application\ Support/Code/User/settings.json
and add the following :
{
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "'MesloLGS NF'",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.lineHeight": 1.3
}
brew install --cask virtualbox
Intel Support
brew install docker
M1 Support Download this docker M1 image Docker Desktop Apple M1
brew install --cask kitematic
brew install --cask openinterminal
brew install --cask spectacle
brew install --cask dozer
brew install --cask db-browser-for-sqlite
brew install --cask proxyman
brew install --cask postman
Chrome :
FireFox :
- Tab Session Manager
- firefox-multi-account-containers
- Simple-tab-groups
- uBlock Origin
- CORS Everywhere
- User Agent Switcher
- Octotree
- DarkReader
- Bitwarden Password Manager
curl -L https://get.rvm.io | bash -s stable
echo $"\nsource /Users/$(whoami)/.rvm/scripts/rvm\n" >> /Users/$(whoami)/.zshrc # or .bashrc
rvm install ruby-3.2.2
rvm use ruby-3.2.2
rvm --default use 3.2.2
M1 Support
Add the following to your .zshrc
alias gem="arch -x86_64 sudo gem"
Please run the following scripts too !
gem install --user-install ffi -- --enable-libffi-alloc
Install Bundler
gem install bundler
Install CocoaPods :
sudo gem install cocoapods -n /usr/local/bin
M1 Support
Add this to .zshrc
alias pod="arch -arm64 pod"
No Need to install on macOS ! Don't forget to check the SPM Aliases !
- SPM Template (With SwiftUI) : swift5-module-template
- SPM Sample App (With StoryBoard) : SwiftExampleAppWithSPM
Many options to download Xcode you can use the following
Recommended Using : Xcodes
# Install xcodes
brew install xcodesorg/made/xcodes
# list available xcode versions
xcodes list
# Update available xcode versions
xcodes update
# Install Aria2 "For Fast download"
brew install aria2
# Install XCode (ex. Xcode 13 Beta 5)
xcodes install 14.3
Before running xcodes, export this environment variables :
export XCODES_USERNAME="<your_email>"
export XCODES_PASSWORD="<your_pass>"
Others :
Using again Xcodes tool from above
List Runtimes
xcodes runtimes --include-betas
Install iOS Runtime
xcodes runtimes install "iOS 17.0-beta1"
Install xcode-install
sudo gem install xcode-install
Display all simulators By name
xcversion simulators
Install a Simulator
xcversion simulators --install="iOS 14.4 Simulator"
Display all availables devices and simulators ByIds
xcrun simctl list
Output Example :
D9C60396-FC76-4693-AEE2-84AA7C8EB200 (active, disconnected)
Watch: Apple Watch Series 6 - 44mm (FE1A98F8-C2F2-446D-B436-B484B1D87837) (Shutdown)
Phone: iPhone 12 Pro Max (7395B23C-9AAE-4CEB-8FCC-82A70FCE0553) (Shutdown)
Open Simualtor/Device ById
I advice to add this alias to your config :
alias sim="/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID"
Then just run :
sim D9C60396-FC76-4693-AEE2-84AA7C8EB200
(ex. From above the DeviceUDID is : D9C60396-FC76-4693-AEE2-84AA7C8EB200)
To Open latest iOS Simulator
open -a Simulator
Install Fastlane
gem install fastlane -NV
then run :
bundle update
bundle install
bundle exec fastlane ...
Sometimes a write issue appear using bundle install/update to fix it do this :
sudo chown -R $(whoami) /Users/$(whoami)/.gem
Using Jabba "Java Version Manager" (Recommanded)
# Install Jabba
echo $'\nexport JABBA_VERSION="0.11.2"\n' >> /Users/$(whoami)/.zshrc
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
# Verify this line is in .zshrc (Should be added automatically)
[ -s "/Users/$(whoami)/.jabba/jabba.sh" ] && source "/Users/$(whoami)/.jabba/jabba.sh"
# List available java versions
jabba ls-remote
# Install JDK 16
jabba install [email protected]
# Verify java version
java -version
## The result should be :
# openjdk 17.0.1 ...
# Don't forget to export JAVA_HOME
echo $"\nexport JAVA_HOME=/Users/$(whoami)/.jabba/jdk/[email protected]/Contents/Home\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$JAVA_HOME:$PATH\n" >> /Users/$(whoami)/.zshrc
brew install gradle
## Reinstall Gradle to Latest Version
echo $"\nexport GRADLE_VERSION=$(echo $(arr=($(gradle --version | awk '{ print $2 }')) && echo ${arr[1]}))\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport GRADLE_HOME=`brew --prefix`/Cellar/gradle/$GRADLE_VERSION\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$GRADLE_HOME/bin:$PATH\n" >> /Users/$(whoami)/.zshrc
Install Command-line tools for building and debugging Android apps (sdkmanager, avdmanager, etc.)
# Command-line tools for building and debugging Android apps
brew install --cask android-commandlinetools
# Export Android HOME (for tools)
echo $"\nexport ANDROID_HOME=`brew --prefix`/share/android-commandlinetools\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$ANDROID_HOME:$PATH\n" >> /Users/$(whoami)/.zshrc
Do this :
# Export SDK MANAGER
echo $"\nexport SDK_MANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$SDK_MANAGER:$PATH\n" >> /Users/$(whoami)/.zshrc
If you ever have an issue regarding unaccepted licence do this :
# Accept all licenses
yes | sdkmanager --licenses
Usefull CLI :
# list available repos (Stable chanel)
sdkmanager --list --channel=0
# Install Android SDK Command-line Tools Latest
sdkmanager "cmdline-tools;latest"
# Install Android SDK Platform 34
sdkmanager "platforms;android-34"
# Install Android SDK Build-Tools
sdkmanager "build-tools;34.0.0"
More Infos :
echo $"\nexport AVD=$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$AVD:$PATH\n" >> /Users/$(whoami)/.zshrc
sdkmanager "emulator"
echo $"\nexport EMULATOR=$ANDROID_HOME/emulator\n" >> /Users/$(whoami)/.zshrc
echo $"\nexport PATH=$EMULATOR:$PATH\n" >> /Users/$(whoami)/.zshrc
# List existing avds (already created)
avdmanager list avds
# Install an EMULATOR system image
sdkmanager "system-images;android-33;google_apis_playstore;arm64-v8a"
# Create an AVD (ex. SDK 33 for // Architecture: arm64-v8a (Apple Silicom Mac) or x86_64 (Intel) )
avdmanager create avd -f --name "PIXEL_8" -k "system-images;android-33;google_apis_playstore;arm64-v8a"
# list available Emulator
$EMULATOR/emulator -list-avds
# Run an emulator (ex. NAME_OF_EMU: Pixel_8)
$EMULATOR/emulator -avd NAME_OF_EMU
## This command download the latest android-platform-tools and copy them into `brew --prefix`/bin and do the linking as well
brew install android-platform-tools
brew install --cask android-ndk
Install Android studio
brew install --cask android-studio
GenyMotion (Recomended for Intel)
brew install --cask genymotion
Usefull ClI :
## Copy this to .zshrc
echo 'GMTOOL_PATH="/Applications/Genymotion.app/Contents/MacOS/"' >> /Users/$(whoami)/.zshrc
echo 'export PATH=$GMTOOL_PATH:$PATH' >> /Users/$(whoami)/.zshrc
## Display devices list
genyshell -c "devices list"
## To Create / run u need licence !
## Create a device
gmtool admin create "Google Pixel - 9.0 - API 28 - 1080x1920" GP_9
## Run a device
gmtool admin run GP_9
Android Emulator - Apple M1
Download this emulator Apple M1
Best tool so far OpenMtp: better than Google AFT
brew install --cask openmtp
Google Android Tool
brew install --cask android-file-transfer
Best for anything : Scrcpy (Recomended) (Vysor + Android File Transfer alternative)
brew install scrcpy
Part 4 : Install Flutter
## Install Flutter
## Dart & Dart SDK will be inside : bin/ & bin/cache
brew install --cask flutter
## Migrate to null safety (Only inside a project)
# dart migrate --apply-changes
## Check That everythong is OK
flutter doctor -v
Add theses lines to .zshrc
FLUTTER_VERSION=$(echo $(arr=($(flutter --version | awk '{ print $2 }')) && echo ${arr[1]}))
export FLUTTER_SDK=`brew --prefix`/Caskroom/flutter/$FLUTTER_VERSION/flutter
export PATH=$PATH:$FLUTTER_SDK
## Flutter cache
PUB_CACHE_BIN=$HOME/.pub-cache/bin
export PATH=$PATH:$PUB_CACHE_BIN
## Dart Path
DART_PATH=$FLUTTER_SDK/bin/dart
export PATH=$PATH:$DART_PATH
## Export DART SDK Path
export DART_SDK=$FLUTTER_SDK/bin/cache/dart-sdk
In case export environment variable doesn't work properly with Android Studio, follow theses steps.
Option 1 : In case the following command didn't work, follow the bellow steps.
flutter config --android-sdk $ANDROID_HOME
Options 2 :
- create a symbolic link to Android SDK :
ln -s $ANDROID_HOME
- call the link you created from (Preference -> Appearance & Behaviour -> System Settings -> Android SDK)
- create a symbolic link to Dart SDK :
ln -s $DART_SDK
- call the link you created from (Preference -> Languages & Frameworks -> Dart)
- create a symbolic link to Flutter SDK :
ln -s $FLUTTER_SDK
- call the link you created from (Preference -> Languages & Frameworks -> Flutter)
Make sure that exported JAVA_HOME was not read in Android Studio Correctly. Go to (Right Click on your project -> Platform Settings -> SDKs).
If not :
- create a symbolic link to Java JDK :
ln -s $JAVA_HOME
- call the link you created
If everything was all good you should get something like this :
❯ flutter doctor -v ─╯
[✓] Flutter (Channel stable, 3.10.2, on macOS 13.4 22F66 darwin-arm64 (Rosetta),
locale en-BE)
• Flutter version 3.10.2 on channel stable at
/usr/local/Caskroom/flutter/3.10.2/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9cd3d0d9ff (3 days ago), 2023-05-23 20:57:28 -0700
• Engine revision 90fa3ae28f
• Dart version 3.0.2
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /usr/local/share/android-commandlinetools
• Platform android-32, build-tools 30.0.2
• ANDROID_HOME = /usr/local/share/android-commandlinetools
• ANDROID_SDK_ROOT = /usr/local/share/android-commandlinetools
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.12.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64
(Rosetta)
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126
[✓] Network resources
• All expected network resources are available.
• No issues found!
Install Rosetta 2
softwareupdate --install-rosetta
Dart SDK Install issues
- Update them from Software Update in System Preferences or run:**
softwareupdate --all --install --force
- If that doesn't show you any updates, run :
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
You're good to go !
Update 05/2023 :