- Notifications
You must be signed in to change notification settings - Fork441
idb is a flexible command line interface for automating iOS simulators and devices
License
facebook/idb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The "iOS Development Bridge" oridb
, is a command line interface for automating iOS Simulators and Devices. It has three main principles:
- Remote Automation:
idb
is composed of a "companion" that runs on macOS and a python client that can run anywhere. This enables scenarios such as a "Device Lab" within a Data Center or fanning out shards of test executions to a large pool of iOS Simulators. - Simple Primitives:
idb
exposes granular commands so that sophisticated workflows can be sequenced on top of them. This means you can useidb
from an IDE or build an automated testing scenario that isn't feasible with default tooling. All of these primitives aim to be consistent across iOS versions and between iOS Simulators and iOS Devices. All the primitives are exposed over a cli, so that it's easy to use for both humans and automation. - Exposing missing functionality: Xcode has a number of features that aren't available outside its user interface.
idb
leverages many of Private Frameworks that are used by Xcode, so that these features can be in GUI-less automated scenarios.
idb
is built on top theFBSimulatorControl
andFBDeviceControl
macOS Frameworks, contained within this repository. These Frameworks can be used independently ofidb
, howeveridb
is likely to provide the simplest install and the most sensible defaults for most users.
We've given a talk aboutidb
at F8, so that you can learn more about whatidb
is and why we built it. Arecording of the talk is available here.
idb
is made up of 2 major components, each of which needs to be installed separately.
Each target (simulator/device) will have a companion process attached allowingidb
to communicate remotely.
Theidb
companion can be installed via brew or built fromsource
brew tap facebook/fbbrew install idb-companion
Note: Instructions on how to install brew can be foundhere
A cli tool and python client is provided to interact withidb
.
It can be installed via pip:
pip3.6 install fb-idb
Note: The idb client requires python 3.6 or greater to be installed.
Please refer tofbidb.io for detailed installation instructions and a guided tour of idb.
Once installed, just run the list-targets command which will show you all the simulators installed on your system:
$ idb list-targets...iPhone X | 569C0F94-5D53-40D2-AF8F-F4AA5BAA7D5E | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion ConnectediPhone Xs | 2A1C6A5A-0C67-46FD-B3F5-3CB42FFB38B5 | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion ConnectediPhone Xs Max | D3CF178F-EF61-4CD3-BB3B-F5ECAD246310 | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion ConnectediPhone Xʀ | 74064851-4B98-473A-8110-225202BB86F6 | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion Connected...
list-apps
will show you all the apps installed in a simulator:
$ idb list-apps --udid 74064851-4B98-473A-8110-225202BB86F6com.apple.Maps | Maps | system | x86_64 | Not running | Not Debuggablecom.apple.MobileSMS | MobileSMS | system | x86_64 | Not running | Not Debuggablecom.apple.mobileslideshow | MobileSlideShow | system | x86_64 | Not running | Not Debuggablecom.apple.mobilesafari | MobileSafari | system | x86_64 | Not running | Not Debuggable
launch
will launch an application:
$ idb launch com.apple.mobilesafari
Head overto the main documentation for more details on what you can do with idb and the full list of commands. There are also instructions on how tomake changes toidb
including building it from source.
Find the full documentation for this project atfbidb.io
We also have apublic Discord Server that you can join
We've releasedidb
because it's a big part of how we scale iOS automation at Facebook. We hope that others will be able to benefit from the project where they may have needs that aren't currently serviced by the standard Xcode toolchain.
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Pleaseread the full text so that you can understand what actions will and will not be tolerated.
Read ourcontributing guide to learn about our development process.
About
idb is a flexible command line interface for automating iOS simulators and devices