Skip to main content

IDB (iOS Development Bridge)

IDB enables programmatic interaction with connected iOS devices from the Mac contributor machine, allowing AstroFarm to manage device communication and device operations.

Install IDB

To install the two components (IDB Client and IDB Companion) separately follow the steps below:

  1. Open the Terminal and run the following command:
brew tap facebook/fb
  1. Run the following command to install IDB Companion:
note

This command will execute successfully only if you have Xcode installed on the Contributor Machine.

brew install idb-companion
  1. Run the following command to install IDB Client:
pip3.6 install fb-idb

If users face issues installing the IDB, please refer to the following instructions during installation:

If getting error: externally-managed-environment while using pip3:

  1. Update homebrew and install pyenv:
brew update
brew install pyenv
  1. Set up your shell environment for Pyenv.

    If using zsh as a terminal profile:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

If using bash as a terminal profile:

a. Add the commands to ~/.bashrc:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc

b. Then, if you have ~/.profile, ~/.bash_profile or ~/.bash_login, add the commands there as well. If you have none of these, create a ~/.profile and add the commands there.

To add to ~/.profile:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile

To add to ~/.bash_profile:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
  1. Restart your shell:
exec "$SHELL"
  1. Install Python versions:
pyenv install 3.9
pyenv global 3.9
note

Based on the contributor model, please install the appropriate Python version listed below for your setup:

Mac TypeRecommended PythonReason
Intel Macs (2017–2020)Python 3.8 – 3.10Stable with older Xcode toolchains
Apple Silicon (M1 / M2 / M3)Python 3.10 – 3.12Better ARM64 compatibility
Devices on macOS 26Python 3.11Significant performance improvements
note

idb (iOS Debug Bridge) is a tool used to enable communication and control between macOS and connected iOS devices for automation and debugging. It consists of two components: the IDB CLI and the IDB Companion. The CLI is used to send commands from the terminal, while the Companion runs as a background service on macOS and executes those commands by communicating directly with connected iOS devices.