Setup MacOS for Android and iOS Automation¶
Step 1: Install Homebrew¶
Homebrew is the most popular MacOS package manager. Homebrew installs packages to their own directory and then symlinks their files into /usr/local.
Step 2: Install Java8(OpenJDK version "1.8.0_292")¶
Install by Homebrew
Verify installation by Java cli
Step 3: Setup the Java Version¶
If you use zsh
, open ~/.zshrc
file to add below commands. Otherwise, add into ~/.profile
file. If your environment has multiple version of Java, make sure using the Java 8.
# Note:
# There are many ways to open the `~/.zshrc` file. ex: `vim`, `nano`, etc.
# Use open command to open it, and it will open the file by system default app
open ~/.zshrc
# Set Java Path
export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
export PATH="/usr/local/Cellar/maven/3.8.6/bin:${PATH}"
Note that this setting JAVA_HOME
doesn't load into the session. Please execute the below commands to make sure all things are right
Step 4: Install Android Studio¶
-
Download the Android Studio, and launch the application
-
Open the app click on Next, and configure and click on
finish
-
Install SDK version as required your project
-
Install SDK Tools
-
Setup the required path, like the Step 3, add below commands into
~/.zshrc
or~/.profile
# Set Android Path export ANDROID_HOME="/Users/$( whoami )/Library/Android/sdk" export PATH="$ANDROID_HOME/platform-tools:$PATH" export PATH="$ANDROID_HOME/tools:$PATH" export PATH="$ANDROID_HOME/tools/bin:$PATH" export PATH="$ANDROID_HOME/build-tools/33.0.0:$PATH" export PATH="$ANDROID_HOME/build-tools/33.0.0/bin:$PATH" export PATH="$ANDROID_HOME/emulator:$PATH"
-
Reload the
~/.zshrc
and then execute the below command to verify the setting
Step 5: Install Xcode from app store¶
Open the app store, and typing xcode on search button then install it
-
Open the Xcode from applications folder and install required components
-
Install command line if you haven't installed
-
Install Carthage
-
Change the permissions and accept the Xcode license.
-
Install Carthage by homebrew
-
Step 6: Install Appium¶
Install nvm
by Homebrew, nvm
is node version manager tool
# nvm is node.js version manager tool
brew install nvm
# Download node.js with v16.17.0
nvm install v16.17.0
# Set v16.17.0 as node default version
nvm alias default 16.17
# Install appium and appium-doctor on global
npm install -g appium@1.22.3 appium-doctor
# Diagnostic your current environment for iOS
appium-doctor --ios
# Diagnostic your current environment for android
appium-doctor --android
Step 7: Install libimobiledevice¶
libimobiledevice is A cross-platform FOSS library written in C to communicate with iOS devices natively
Step 8: Install libplist¶
-
Install prerequests packages
-
Clone the project
-
Now you can build and install it
Step 9: Install usbmuxd¶
-
Clone the project
-
Now you can build and install it
Step 10: Install usbmuxd¶
-
Clone the project
-
Now you can build and install it
Step 11: Setup required path¶
Like the Step 3, add below commands into ~/.zshrc
or ~/.profile
Step 12: Install ifuse¶
Step 13: Install ffmpeg¶
A complete, cross-platform solution to record, convert and stream audio and video.