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

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

Steps to setup Appium with Java (OpenJDK version “1.8.0_265") With Android Studio(“4.1”) and Xcode (“12.1”)on MAC os Catalina (10.15.7)

$ chsh -s /bin/bash
Image for post
Image for post
Image for post
Image for post
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
$ brew cask install adoptopenjdk/openjdk/adoptopenjdk8
$ java -version
Image for post
Image for post
https://developer.android.com/studio
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
$ 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
Image for post
Image for post
$ node -v
v14.14.0
$ npm -v
6.14.8
Image for post
Image for post
$ npm install -g appium
Image for post
Image for post
$ npm install wd
$ npm install -g appium-doctor
Image for post
Image for post
$ npm install -g appium@1.1x.x
$ nano .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
Image for post
Image for post
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
Image for post
Image for post
source ~/.bash_profile
echo $ANDROID_HOME
/Users/kchetan/Library/Android/sdk
Image for post
Image for post
$ npm i -g webpack
Image for post
Image for post
$ brew install libimobiledevice
Image for post
Image for post
$ npm install -g ios-deploy
Image for post
Image for post
$ brew install cmake
Image for post
Image for post
$ npm install -g opencv4nodejs
Image for post
Image for post
$ brew install wix/brew/applesimutils
Image for post
Image for post
$ brew install ios-webkit-debug-proxy
Image for post
Image for post
$ brew cask install osxfuse
$ brew install ifuse
$ npm i -g mjpeg-consumer
Image for post
Image for post
$ brew install ffmpeg
$ brew install lyft/formulae/set-simulator-location
Image for post
Image for post
$ 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
Image for post
Image for post
appium-doctor
Image for post
Image for post

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

$ appium
Image for post
Image for post

Cheers 🍻 🥂 🍺

Automation Test Engineer by Profession, Traveller by the Weekend

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store