If you encounter errors or issues using this CLI, try the following troubleshooting steps before reporting a bug:
- macOS Only: This tool only works on macOS with Xcode and iOS simulators installed.
- IDB Tool: Ensure Facebook IDB is installed and available in your PATH.
- Node.js: Make sure Node.js is installed and up to date (for npm installs).
The installation section in IDB is a little out of date. Since python environments are famously borked, here are some ways to install that are hopefully compatible with your existing python install.
- Install Homebrew if you don't have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install Python (if not already installed):
brew install python
- Install idb using pip:
pip3 install --user fb-idb
- Ensure your user base binary directory is in your PATH (often
~/.local/bin):export PATH="$HOME/.local/bin:$PATH" # Add the above line to your ~/.zshrc or ~/.bash_profile for persistence
- Verify installation:
idb -h
- Install asdf:
brew install asdf
- Add the Python plugin, install Python, set to global version (see asdf docs for set and global to do isolated installs):
asdf plugin add python asdf install python latest asdf global python latest asdf set python <latest-version> -u asdf reshim
- Install idb using pip:
python -m pip install --user fb-idb
- Ensure your user base binary directory is in your PATH (often
~/.local/bin):export PATH="$HOME/.local/bin:$PATH" # Add the above line to your ~/.zshrc or ~/.bash_profile for persistence
- Verify installation:
idb -h
- Open Xcode and boot an iOS simulator manually.
- Run
xcrun simctl list devicesto verify a simulator is booted.
- Follow the install steps above for Homebrew + pip or asdf.
- Ensure
idbis in your PATH: try runningidb -hin your terminal. - Set a custom path with
IOS_SIMULATOR_CLI_IDB_PATHif needed. - On Apple Silicon Macs, install
fb-idbwith the system/Xcode Python (arm64), not Intel Homebrew Python:/usr/bin/python3 -m pip install --user fb-idb export IOS_SIMULATOR_CLI_IDB_PATH="$HOME/Library/Python/3.9/bin/idb"
- If you see
spawn idb EACCESorCoreSimulator couldn't be loaded because it doesn't contain a version for the current architecture, youridbis likely using an x86_64 Python whileidb_companionneeds arm64. Reinstallfb-idbwith/usr/bin/python3as shown above.
- Ensure you have permission to write to the output path (e.g., for screenshots or recordings).
- Try using a path in your home directory or
~/Downloads. - Set
IOS_SIMULATOR_CLI_DEFAULT_OUTPUT_DIRto a writable directory.
- Restart the simulator and try again.
- Quit and relaunch Xcode if needed.
- Check dimensions of the simulator screen and adjust coordinates accordingly. Screenshots have 3x resolution and this may result in incorrect position of screen presses.
- Check the README for setup and usage instructions.
- If the problem persists, open an issue and include the error message and steps to reproduce.