Tip
Most users should use valdi dev_setup instead! This guide is a reference for manual installation or troubleshooting. The valdi dev_setup command automatically handles most of these steps.
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_setup installs 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:
- Platform tools (API level 35)
- Build tools (version 34.0.0)
- NDK (version 25.2.9519653)
If you prefer using Android Studio's GUI:
- Download and install Android Studio from developer.android.com/studio
- Open any project, navigate to
Tools->SDK Manager - Under SDK Platforms, install API level 35
- Under SDK Tools, uncheck
Hide obsolete packages, checkShow Package Details - Install build tools version 34.0.0
- Install NDK version 25.2.9519653
Update .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