docs/setup/macos_setup.md
Get the CLI from npm:
npm install -g @snap/valdi. Then runvaldi dev_setupfor automated setup. This guide is a reference for manual installation or troubleshooting only.
This guide documents the dependencies Valdi needs on macOS and how to install them manually. For the quickest setup, use valdi dev_setup which automates most of these steps.
This guide assumes you're using the default shell (zsh). Setup is possible for other shells, but you'll need to adapt the configuration file paths.
Make sure you have the latest version of XCode installed in addition to iPhone Simulator packages for iOS development. Latest versions of XCode can be found on Apple's App Store.
Make sure XCode tools are in your path:
sudo xcode-select -s /Applications/Xcode.app
Most of Valdi's required dependencies can be installed via Homebrew.
Follow these instructions to install: https://brew.sh/
Add Homebrew to your path:
echo >> ~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Add the following to the top of your .zshrc to setup for autocomplete.
autoload -U compinit && compinit
autoload -U bashcompinit && bashcompinit
Make sure to load your changes via source ~/.zshrc.
brew install npm bazelisk openjdk@17 temurin git-lfs watchman ios-webkit-debug-proxy
sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc
echo 'export JAVA_HOME=`/usr/libexec/java_home -v 17`' >> ~/.zshrc
Git Large File Storage (LFS) manages the binaries that we need for Valdi.
git lfs install
[!NOTE]
valdi dev_setupinstalls Android SDK command-line tools automatically. You only need Android Studio if you prefer using its GUI or need Android emulator management.
Run valdi dev_setup - it will download and install Android SDK command-line tools, including:
If you prefer using Android Studio's GUI:
Tools -> SDK ManagerHide obsolete packages, check Show Package DetailsUpdate .zshrc with the following:
echo "export ANDROID_HOME=$HOME/Library/Android/sdk" >> ~/.zshrc
echo "export ANDROID_NDK_HOME=\$ANDROID_HOME/ndk-bundle" >> ~/.zshrc
echo "export PATH=\$ANDROID_HOME/platform-tools:\$PATH" >> ~/.zshrc
source ~/.zshrc