Setup Appium on Mac OS for Android and iOS App Automation [2021 Update]

Steps to setup Appium with Java (OpenJDK) With Android Studio and Xcode on MAC OS Big Sur

$ chsh -s /bin/bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
$ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
$ java -version
https://developer.android.com/studio
$ xcode-select --install  
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
$ sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
$ sudo xcodebuild -license accept
$ brew install carthage
$ brew install node
$ node -v
v14.14.0
$ npm -v
6.14.8
$ npm install -g appium
$ npm install wd
$ npm install -g appium-doctor
$ npm install -g appium@1.1x.x
$ nano .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
source ~/.bash_profile
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
$ nano .bash_profile
export ANDROID_HOME=/Users/kchetan/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/platform-tools/bin:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
export PATH=$ANDROID_HOME/build-tools/30.0.2:$PATH
export PATH=$ANDROID_HOME/build-tools/30.0.2/bin:$PATH
source ~/.bash_profile
echo $ANDROID_HOME
/Users/kchetan/Library/Android/sdk
$ npm i -g webpack
$ brew install libimobiledevice
$ npm install -g ios-deploy
$ brew install cmake
$ npm install -g opencv4nodejs
$ brew install wix/brew/applesimutils
$ brew install ios-webkit-debug-proxy
$ brew install osxfuse
$ brew install ifuse
$ npm i -g mjpeg-consumer
$ brew install ffmpeg
$ brew install lyft/formulae/set-simulator-location
$ brew tap facebook/fb
$ brew install idb-companion
$ pip3.6 install fb-idb
https://github.com/google/bundletool/releases
nano .bash_profileexport PATH=$ANDROID_HOME/bundle-tool:$PATHsource .bash_profile
appium-doctor

Verify if you see the following message after running the Appium doctor command.

$ appium

Cheers 🍻 🥂 🍺

Automation Test Engineer by Profession, Traveller by the Weekend