idb is a flexible command line interface for automating iOS simulators and devices
Перейти к файлу
Josh Kearney d5bb2967bf Convert the CircleCI workflow to a GitHub Actions workflow (#861)
Summary:
This pull request converts the CircleCI workflows to GitHub actions workflows. [Github Actions Importer](https://github.com/github/gh-actions-importer) was used to convert the workflows initially, then I edited them manually to correct errors in translation.

**Issues**

1. _facebook/idb/build_and_deploy -> deploy-website_

```
Error: Running "git push" command failed. Does the GitHub user account you are using have push access to the repository?
```

This is due to the fact that `${{ secrets.GITHUB_TOKEN }}` is either undefined or doesn't have the appropriate permissions or scopes enabled to access the repository.

## How did you test this change?

I tested these changes in a [forked repo](https://github.com/robandpdx-org/idb/actions/runs/7717454971).

https://fburl.com/workplace/f6mz6tmw

Pull Request resolved: https://github.com/facebook/idb/pull/861

Reviewed By: Nekitosss

Differential Revision: D56620612

Pulled By: jbardini

fbshipit-source-id: 00b543d0019df4b59324d96582cce321a82c331a
2024-04-26 02:05:22 -07:00
.circleci Replace deprecated circleci/node with cimg/node 2022-03-01 05:23:23 -08:00
.github Convert the CircleCI workflow to a GitHub Actions workflow (#861) 2024-04-26 02:05:22 -07:00
CompanionLib Use symlink to persistence xctest bundle instead of copying to speed up the test running time 2024-04-24 03:24:14 -07:00
Configuration Run Xcode 13.2.1 upgrade check 2022-01-18 04:16:14 -08:00
FBControlCore sed died -> exited 2024-04-10 12:35:48 -07:00
FBControlCoreTests `XCTAssertTrue(NO);` -> `XCTFail();` 2024-01-25 11:42:12 -08:00
FBDeviceControl Fix typo (#854) 2024-03-27 01:28:58 -07:00
FBDeviceControlTests remove prefix_headers 2024-02-16 13:57:51 -08:00
FBSimulatorControl Fix crasher on describe-point 2024-02-15 10:34:37 -08:00
FBSimulatorControl.xcodeproj use devicectl to launch apps on iOS 17 devices. 2023-12-13 15:55:16 -08:00
FBSimulatorControlTests Rename option to --enable-continuous-coverage-collection 2023-08-25 07:17:14 -07:00
Fixtures Refactored integration tests 2023-02-15 09:56:45 -08:00
IDBCompanionUtilities fbobjc/EndToEndTests 2023-03-29 11:16:02 -07:00
IDBCompanionUtilitiesTests fbobjc/EndToEndTests 2023-03-29 11:16:02 -07:00
PrivateHeaders Add annotations to AccessibilityPlatformTranslation headers 2024-02-15 06:22:36 -08:00
Shims Force swift module prefix in test identifiers 2023-08-30 02:33:41 -07:00
XCTestBootstrap Write Test Configuration to the container of a test bundle, instead of inside the test bundle 2024-04-24 03:24:14 -07:00
XCTestBootstrapTests Do not try to remove app that is already removed 2023-09-26 05:10:30 -07:00
fbxctest Rename option to --enable-continuous-coverage-collection 2023-08-25 07:17:14 -07:00
idb apply Black 2024 style in fbcode (16/17) 2024-03-04 14:29:30 -08:00
idb_companion Move BridgeFuture to Companion Lib 2023-12-11 06:32:48 -08:00
idb_companion.xcodeproj Move BridgeFuture to Companion Lib 2023-12-11 06:32:48 -08:00
idb_companion.xcworkspace Remove cpp dependency from pods 2022-08-03 02:33:44 -07:00
proto Rename option to --enable-continuous-coverage-collection 2023-08-25 07:17:14 -07:00
website Updating link for PIP installation (#855) 2024-03-27 10:07:11 -07:00
.dockerignore
.gitignore Add shim/maculator.dylib to .gitignore 2021-11-18 04:33:11 -08:00
.travis.yml .travis.yml uses main instead of master 2021-09-01 01:26:03 -07:00
CODE_OF_CONDUCT.md Adopt Contributor Covenant 2019-08-29 23:22:43 -07:00
Dockerfile
LICENSE Update copyright headers from Facebook to Meta 2021-12-29 18:51:28 -08:00
README.md fix: typo in readme (#833) 2024-03-27 10:04:43 -07:00
build.sh Update copyright headers from Facebook to Meta 2021-12-29 18:51:28 -08:00
docker-compose.yml
idb_build.sh Switch to universal binary building for OSS 2022-08-12 01:59:39 -07:00
idb_companion_oss_release.py Create script to simplify OSS release 2022-08-18 06:09:30 -07:00
protoc_compiler_template.py changed grpclib to 0.4.1 (#653) 2021-03-01 01:58:17 -08:00
setup.py Update copyright headers from Facebook to Meta 2021-12-29 18:51:28 -08:00

README.md

idb logo

Discord

The "iOS Development Bridge" or idb, 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 use idb 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 the FBSimulatorControl and FBDeviceControl macOS Frameworks, contained within this repository. These Frameworks can be used independently of idb, however idb is likely to provide the simplest install and the most sensible defaults for most users.

We've given a talk about idb at F8, so that you can learn more about what idb is and why we built it. A recording of the talk is available here.

Quick Start

idb is made up of 2 major components, each of which needs to be installed separately.

idb companion

Each target (simulator/device) will have a companion process attached allowing idb to communicate remotely.

The idb companion can be installed via brew or built from source

brew tap facebook/fb
brew install idb-companion

Note: Instructions on how to install brew can be found here

idb client

A cli tool and python client is provided to interact with idb.

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 to fbidb.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 Connected
iPhone Xs | 2A1C6A5A-0C67-46FD-B3F5-3CB42FFB38B5 | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion Connected
iPhone Xs Max | D3CF178F-EF61-4CD3-BB3B-F5ECAD246310 | Shutdown | simulator | iOS 12.2 | x86_64 | No Companion Connected
iPhone 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-225202BB86F6
com.apple.Maps | Maps | system | x86_64 | Not running | Not Debuggable
com.apple.MobileSMS | MobileSMS | system | x86_64 | Not running | Not Debuggable
com.apple.mobileslideshow | MobileSlideShow | system | x86_64 | Not running | Not Debuggable
com.apple.mobilesafari | MobileSafari | system | x86_64 | Not running | Not Debuggable

launch will launch an application:

$ idb launch com.apple.mobilesafari

Head over to 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 to make changes to idb including building it from source.

Documentation

Find the full documentation for this project at fbidb.io

We also have a public Discord Server that you can join

Contributing

We've released idb 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.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process.

License

idb is MIT-licensed.