These commits are when the Protocol Buffers files have changed: (only the last 100 relevant commits are shown)
| Commit: | ca88a67 | |
|---|---|---|
| Author: | Joshua Yoes | |
| Committer: | meta-codesync[bot] | |
Type `idb ui text` on the simulator's hardware keyboard layout (#1002) Summary: ## Motivation `idb ui text` maps each character to a key position with a US table in the client and sends key presses. On a simulator whose hardware keyboard layout is not US the guest types different characters: `idb ui text mobiletest@example.com` arrives as `,obiletest2exq,ple:co,` on French, and characters off the US keyboard fail with "No keycode found". See https://github.com/meta/idb/issues/666. What changes: - `HIDEvent` gains a `text` event (`HIDText`: the text and an optional layout name). The companion turns it into key presses for the layout with `Simulator.keyboard.typingEvent` (added in the framework pull request this depends on). - The companion advertises this as `CompanionInfo.hid_text` (field 13). - `Client.text(text, layout=None)` sends one `HIDText` event to a companion that advertises it. - `idb ui text TEXT --layout LAYOUT` names a layout to type on, such as `US` or `French`. Without it the companion uses the simulator's own. - A character the layout has no key for, or a layout the runtime does not have, fails with `INVALID_ARGUMENT` before anything is typed. The message names the character's offset and the layout. Compatibility: - Old client, new companion: the client still sends key presses, which the companion handles as before. - New client, old companion: `hid_text` is absent, so the client sends the same US key presses it always has. A `--layout` other than `US` is refused in the client before any event is sent. - `--layout US` sends the key presses `idb ui text` sent before this change, on any simulator, for every character the US table has. - On a simulator set to US, the default sends the same key presses as before. On any other layout the default now types the text itself, which is a change for callers who pre-mapped their text to US positions; `--layout US` restores the old behaviour. Known limit: an app keeps the hardware layout it was launched with. The layout is read from the simulator's keyboard settings, so after changing the simulator's keyboards either relaunch the app or pass `--layout`. The `hid` stream handler resolves a leading text event before taking the HID lease, so reading the simulator's keyboard settings does not hold up other HID streams. Orientation, shake and hinge actions still run only under the lease. Physical devices refuse `HIDEvent.text` as unimplemented, as they refuse other key presses. Pull Request resolved: https://github.com/meta/idb/pull/1002 Test Plan: - `./build.sh test CompanionTests`: 225 tests pass. `./build.sh test CompanionLibTests`: 163 pass. `./build.sh test FBSimulatorControlUnitTests`: 513 pass. `./build.sh build all` succeeds. - Python, as CI runs it (`pip install .`, then `python -m pytest --pyargs idb -o python_files='*_tests.py'` from outside the checkout): 411 passed, 1 skipped. Run on Python 3.14. - `idb/grpc/tests` is not part of the installed package, so CI does not collect it. Run against a copy of the installed package: 216 passed, 1 failed. The failure is `repl_contract_tests`, which could not load its fixture in that layout and is not touched by this change. - End to end: `test_ui_text_types_on_the_simulators_keyboard_layout` in `EndToEndTests/test_accessibility.py` passed on fresh iOS 27.2 and iOS 26.2 simulators (run before rebasing onto 60beb1c15; the before/after below was rerun after). It sets the simulator to French, types text that AZERTY moves along with option-layer and dead-key characters, checks a refused character types nothing, and checks `--layout US` sends US positions. It restores the keyboard settings it changes. - Manual, iOS 27.2 (and the French and US cases on 26.2), typing into Safari's address bar and reading the field back: - French, French via `hw=Automatic`, German, Canadian French and Devanagari strings typed exactly, including `mobiletest@example.com`, `€`, `ê`, `ñ`, `ß`. - en_US: all 94 printable ASCII characters typed exactly; `café €` typed exactly. - French with `--layout US`: `azerty` arrives as `qwerty`. - `abc日def`: exit 1, `Cannot type the character at offset 3 on the French hardware keyboard layout`, field unchanged. - `--layout Bogus`: exit 1, `The simulator's runtime has no hardware keyboard layout named "Bogus"`, field unchanged. - Before/after on a French simulator, stock idb 1.7.6 against this change, rerun on the rebased build: stock types `,obiletest2exq,ple:co,` for `mobiletest@example.com`; this change types it exactly. Recording (stock idb first, then this change): https://github.com/user-attachments/assets/e4936b4c-edb3-41d9-97ee-4761f36741ff - Version skew: this client against a 1.7.6 companion types US key presses as before and refuses `--layout French` with `The companion does not support typing on a keyboard layout`; a 1.7.6 client against this companion behaves as before. - `python -m CI.check_documentation_links` passes. ## Related PRs Depends on https://github.com/meta/idb/pull/1001. Until that lands this branch carries its commit too, so only the second commit is new here. `website/docs/idb/ui.mdx` and `commands.mdx` are updated in this pull request. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed By: williamtwilson Differential Revision: D132413670 Pulled By: bryanyantx fbshipit-source-id: 878332e423c57dd2a2c622c2a64579c1f9aef898
| Commit: | 115ecfa | |
|---|---|---|
| Author: | John Haitas | |
| Committer: | meta-codesync[bot] | |
Add opt-in screenshot application context observations Summary: Add a negotiated screenshot context containing fresh foreground application and installed-build observations before and after the same capture attempt. Matching observations describe agreement, not atomic provenance or verified source. Missing identities, unsupported targets and inconsistent samples return an explicit unavailable context without changing successful screenshot pixels. Cancellation and screenshot failures still propagate. Older clients leave the request unset and retain the previous capture path and bytes. Older companions ignore the additive request flag and omit the response context and capability; clients must treat those absences as unknown. The library prerequisite is a separate preceding commit. ### Current runtime evidence Observation-only ordinary screenshots and whole-display recording; source certification remains UNKNOWN. - ReplHost, matching app/build context: https://pxl.cl/kpzjK - CommonTestHost after an actual app switch: https://pxl.cl/kpzjN - Settings, missing BuildInfo without losing pixels: https://pxl.cl/kpzl7 - Whole-display recording: https://pxl.cl/kpzpZ Unidentified-display runtime behavior was not replayed on this identified-display simulator. Reviewed By: williamtwilson Differential Revision: D129625360 fbshipit-source-id: c4c7b8cc376b97d0050ab56b6cb20af931d20769
| Commit: | a04f8c1 | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Expose opt-in notification service extension delivery over gRPC Summary: Add an additive `process_service_extension` flag to `SendNotificationRequest` and advertise `supports_notification_service_extension` in the companion handshake. An absent flag preserves ordinary notification delivery. The companion invokes the simulator's NSE-aware delivery path only when requested, and runs the operation under RPC cancellation. Existing clients retain the old behaviour; newer clients must check the capability before requesting extension processing. Default values are supplied in Rust protobuf consumers so the additive wire change leaves them buildable. Differential Revision: D129940807 fbshipit-source-id: 448062ea6488bcfa7bc32f625b727ff863a1ed20
| Commit: | 7ecb01d | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Shimulator quiescence: name ignored input as a busy signal Summary: `idb ui quiet --api shimulator` now names an app that ignores touches and key presses: a busy state carries the new `INTERACTION_ENABLED` signal, from the shim's `interaction` reason. Such an app drops input rather than queueing it, so a host about to tap can wait for this signal to clear instead of tapping into a screen that discards the tap. Older peers: an older client sees an unknown enum value in `busy_signals`, which it prints as a number or skips; the state is busy either way. An older companion never sends it. An older shim never reports the reason, so the signal never appears; a newer shim with an older companion is still busy, with the signal unnamed. ___ landed-with-radar-review Differential Revision: D129339869 fbshipit-source-id: 0fea41d992359bc7d4bf01234deea7b05e026d14
| Commit: | 7a89712 | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Shimulator quiescence: name scrolling as a busy signal Summary: With the `SHIMULATOR` backend, a busy state now names scrolling: a scroll view moving its content, which used to arrive as `busy` with no signal, is now `SCROLL_IDLE`, beside `RUN_LOOP_IDLE` and `ANIMATIONS_INACTIVE`. A host can then tell a list still coasting after a swipe, where a read shows elements mid-flight, from main-thread work. Older peers: the enum value is additive. A client prints a signal it does not know as its number (the client mappings follow in the next diff), and its one-shot and wait answers are unchanged, since they read only the state. An older companion never sends it. Differential Revision: D129119420 fbshipit-source-id: 66494c07c822370bf6e77c1e76365a91e9f5be8d
| Commit: | d56401a | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Measure quiescence from inside the app with the Shimulator backend Summary: `accessibility_quiescence` gains a backend. `AXBRIDGE`, the default and the only backend so far, measures an app through the accessibility runtime's idle notifications. `SHIMULATOR` measures it from inside the app, through the Shimulator shim's `idle` capability, which reports when the main run loop has nothing to do and no animation is running. - **Framework:** `Simulator.idleSync.quiescence(_:parameters:)` in `FBSimulatorAX` streams the same `QuiescenceEvent`s as `UIAutomation.quiescence`. - The simulator's `IdleSyncHost` serves the capability with a `ShimulatorServer` while a request is open and for 10 s after the last one ends, then releases the socket. It waits on the sockets on a thread of its own rather than polling, and keeps each connected app's latest state, so a back-to-back request is answered at once. - While a request is open, another with no busy threshold shares its threshold, and one with a different threshold is refused, since serving it would reconnect every app. - `.application(pid:)` follows that app. `.frontmost` follows the one armed app connected and refuses to guess between several. - The quiet window counts from the start of the app's idle period. - The busy threshold is sent to the apps as the shortest main-thread work that makes them busy. - An app that does not connect within a second fails with what to set: `IDB_IDLE_SYNC=1` in its launch environment. - **Companion:** `AccessibilityQuiescenceRequest.backend` selects it, and each response says which backend measured it. Shimulator failures are `INVALID_ARGUMENT` (a point or marker target) or `FAILED_PRECONDITION` (not armed, several apps, another busy threshold in use, socket held by another process). - **Open-source build:** `ShimulatorIdleSyncCore` joins the generated Xcode project, since the companion now links it. - **Docs:** the `FBSimulatorAX` and `IdleSync` READMEs. Older peers: a companion that predates the field ignores `backend` and measures with AXBridge, and its responses carry `BACKEND_UNSPECIFIED`, so a client that asked for `SHIMULATOR` can tell. An older client never sends the field and gets AXBridge as before. Reviewed By: williamtwilson Differential Revision: D128608287 fbshipit-source-id: 294a7aa5e2a656c1a594dff9c9aa15e0472e86cf
| Commit: | 7c1f13c | |
|---|---|---|
| Author: | Mosab Elagha | |
| Committer: | meta-codesync[bot] | |
Record a simulator's sound with `record` when asked Summary: # Context The libraries can now capture what a simulator's apps play and add it to a recording as an audio track. The `record` RPC cannot ask for that yet. # This diff - `RecordRequest.Start.audio` asks for the recording to include what the simulator's apps play. The companion starts the capture before the video and confirms it with `Applied.audio`. Applied is now also sent when only audio was asked for. After the recording stops, it adds the audio as an AAC track. Then, before the payload, it sends an `Audio` message with the track's offset and frame count, the processes captured, and any process failures. - When the recording is saved to the client's own `file_path`, the uncut capture is kept beside it as a two-channel, 32-bit float WAV, and `Audio.wav_file_path` names it. - The Rust client never asks for audio. It sends `audio` false and treats an `Audio` message as a protocol error. - A target that cannot record audio fails the request: `unimplemented` for a target whose recordings take no audio, and `failed_precondition` for a target that is not an iPhone or iPad simulator or already has an audio capture running. If the audio cannot be added, the video is still delivered and the error is reported afterwards. Older peers: - An older client never sets `audio`, so it sees no change. - An older companion ignores `audio` and records video only. Its Applied, if sent, has `audio` false, and no `Audio` message follows. A client that asked for audio can tell from either. Reviewed By: whiteio Differential Revision: D127689656 fbshipit-source-id: bbcdc47a078f74dc46efef0a2488af25648ac773
| Commit: | 3663e2e | |
|---|---|---|
| Author: | Milen Dzhumerov | |
| Committer: | meta-codesync[bot] | |
idb-repl dylib loads only into the app build it was made for, checked by idb_companion Summary: **TL;DR**: `idb-repl dylib` takes `--expected-build-uuid` and `--expected-executable-uuid`, the REPL protocol carries them on the `Execute`, and `idb_companion` loads the dylib only if the served app's `BuildInfo.json` and main executable match; otherwise it answers a typed `rejection` and writes nothing, and the client exits 1. **Problem**: A dynamic-replacement thunk is compiled against one build of an app and binds to that build's symbols at `dlopen`. Nothing in the REPL let the driver say which build that is, so a stale install in the simulator took the dylib and misbehaved instead of refusing it. The Apple prelude already stamps every `.app` built with `include_build_info_file` with `BuildInfo.json` (`{"build_uuid": "<BUCK_BUILD_ID>"}`), and the companion already knows the main executable's Mach-O UUID. The `dylib` command also exited 0 on every error, which a driver cannot act on. **Behavioral Change**: Only for an `Execute` that sets an expectation; a plain `Execute` and compiled submissions are unchanged, and every new protobuf field is additive with proto3 defaults, so existing clients and companions are byte-for-byte unchanged on the wire (the REPL transcript fixtures the Swift, Python and Rust suites check still serialize identically). - Protocol: `Execute.expected_build_uuid` (3) and `Execute.expected_executable_uuid` (4); `Ready.verifies_build_uuid` (8), whether the companion honours them; `Result.rejection` (5) with `enum Rejection { NOT_REJECTED, BUILD_UUID_MISMATCH, BUILD_UUID_UNAVAILABLE, EXECUTABLE_UUID_MISMATCH, EXECUTABLE_UUID_UNAVAILABLE, UNSUPPORTED_CONTEXT }`, `NOT_REJECTED` for every other result including a dylib that loaded and then failed. - Companion, APP context: it looks up the installed app for the session's bundle id, reads `BuildInfo.json` at the bundle root or under `Contents/Resources`, takes the executable's UUID from the bundle descriptor and compares both case-insensitively, on every such `Execute`, since a reinstall mid-session is exactly when they change. A mismatch answers `Result{success: false, output: "Error: <bundle> is build X, the dylib expects build Y; reinstall the app or rebuild the dylib", rejection: BUILD_UUID_MISMATCH}` (or `EXECUTABLE_UUID_MISMATCH`); the dylib bytes are never written to the scratch directory or sent to the shim and `next_run_index` stays where it was. An app without a readable `build_uuid` or a known executable UUID is `BUILD_UUID_UNAVAILABLE` / `EXECUTABLE_UUID_UNAVAILABLE`: the driver asked for a guarantee, so missing evidence is a refusal, with the message naming `include_build_info_file`. The SIMULATOR and TEST contexts serve no app: `UNSUPPORTED_CONTEXT`. `Ready` now reports `verifies_build_uuid = true`. - Client: `--expected-build-uuid <uuid>` and `--expected-executable-uuid <uuid>`, either or both, values taken as given. With an expectation and a companion whose `Ready.verifies_build_uuid` is false (an older companion, by default), the command prints `Error: this idb_companion cannot verify an expected build UUID; update it, or drop the expectation` and sends no `Execute`, since that companion would drop the field and load the dylib unchecked. A refused load prints the companion's reason; the typed `rejection` is what the client keys on, not the text. Exit status: 0 when the entry point ran, 1 when the dylib was refused, when the host could not load it (`dlopen`/`dlsym` failures come back as a `Result` with `success` false) or when the entry point failed. **Solution**: `ReplBuildIdentity.swift` holds the pure parts (`ReplAppIdentity`, `ReplBuildExpectation`, `ReplBuildIdentityCheck.verify`), `IDBCommandExecutor.replInstalledApplication(bundleID:)` does the one lookup, and `ReplMethodHandler.serve` wires them in before the dylib is written. On the client, `ReplSession.execute(dylibAt:symbol:expectedBuildUUID:expectedExecutableUUID:)` sets the fields and turns a `Result` with a `rejection` into `ReplExecutionError.rejected`; the session records `verifies_build_uuid` from `Ready` and raises `ReplExecutionError.buildIdentityUnverifiable` first. Both errors leave the session usable. The Rust `idb-proto` crate is prost-generated, whose struct literals must name every field, so `idb-client`, `fake-companion` and the transcript and source-inventory tests gain the fields with their defaults; the Rust `ReplExecute` model still sends empty expectations. The schema inventory golden is regenerated with `schema-inventory-tool`. **Alternatives**: A session-level expectation on `Start` would also work since a session serves one app, but the check belongs with the thing being loaded: an `Execute` is what names a dylib built for a build. Reviewed By: williamtwilson Differential Revision: D128090555 fbshipit-source-id: 2b424fd093f16df336f53b60842fc6a6f1bfc094
| Commit: | 6a6d99e | |
|---|---|---|
| Author: | Scott Ngan | |
| Committer: | meta-codesync[bot] | |
Accept a connection target for a URL install Summary: An install stream can now carry `connect_to`, a host and port. With a `url` payload the companion downloads the URL over a connection to that address instead of the address the URL's host resolves to. The URL's host is still the name TLS verifies and the HTTP `Host` the request asks for (`InstallSource.remoteURL(_:connectingTo:)`, from the previous diff). - `idb.proto`: `InstallRequest.ConnectTo {host, port}`, as `connect_to = 9` in the `value` oneof. Like the other options it comes before the compression frame and the payload. - `CompanionInfo.install_connect_to = 10` advertises it, so a client can tell before it sends anything. `connect` and `describe` set it. - It is refused, not dropped, when the payload is not a `url`, when the port is outside 1 to 65535 or the host is empty, and when it is repeated. What an older peer sees: - New client, older companion: the companion leaves `install_connect_to` unset, so the client refuses `connect_to` before sending a frame (next diff). A client that sent it anyway would have the stream rejected, because the older companion reads tag 9 as a frame with no value ("Expected the next item in the stream to be a payload"). It never installs from the address DNS gives. - Older client, new companion: the client never sends `connect_to` and ignores `install_connect_to`, so nothing changes. The schema inventory golden is regenerated for the two fields, and the Rust schema tests pin both: `CompanionInfo` numbers 1, 4 and 6 to 10, and `connect_to` in the `value` oneof. Differential Revision: D126755943 fbshipit-source-id: da7aec0e75a480e6ec6305ecce4b41385e3dde3d
| Commit: | bd638a3 | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Add a lock_screen RPC that locks and unlocks a simulator Summary: This exposes the guest's lock screen service through the companion. - `FBSimulatorServices` gains `simulator.lockScreen`, with `state()`, `lock()` and `unlock()`. Each returns `SimulatorLockState`, the lock state SpringBoard reports once the request is done. - `idb.proto` gains `rpc lock_screen(LockScreenRequest) returns (LockScreenResponse)`. The request's `Action` is `STATE`, `LOCK` or `UNLOCK`; the response carries `locked`. - `LOCK` and `UNLOCK` are idempotent, and they answer only once SpringBoard reports the new state. - `UNLOCK` fails on a device with a passcode, as an error rather than a response field. - An unrecognised action is rejected as an invalid argument. The change is additive. - An older client never calls the new RPC. - A newer client talking to an older companion gets `UNIMPLEMENTED`. - `STATE`, the default action, only reads. Differential Revision: D126927591 fbshipit-source-id: afb5a7711105b2fe06d295c22587336d3515026c
| Commit: | 99b098e | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Serve camera video from the companion Summary: Adds the `inject_video` RPC, the host half of camera injection. The client sends `start` with a video for the back camera, optionally one for the front camera, and whether to loop. While the injection runs, apps launched through idb are given `IDB_VIDEO_INJECTION=1`, so the virtual camera in `libShimulator-iOS` replaces the one AVFoundation would show them. The companion checks that each input is a regular file with a video track, copies it beside the simulator's socket so apps read the copy, serves the `video` capability, and streams back the processes whose cameras are showing the video: once when the simulator is armed, then whenever that set changes. `stop`, or closing the request stream, ends the injection; a non-looping one also ends once an app has shown the whole video, and a guest failure fails the RPC. On every exit the apps are disconnected, which returns their cameras to the idle pattern, and the copies are deleted. - `SimulatorVideoInjectionCommands` (`simulator.videoInjection`), in `FBSimulatorCodeInjection` beside microphone injection, so `FBSimulatorControl` links neither AVFoundation nor the camera protocol: validation, staging, serving and progress, and the launch-environment arming, which `launch` applies after microphone injection has put the shim in `DYLD_INSERT_LIBRARIES`. Failures are `VideoInjectionError`s. - `InjectVideoMethodHandler`, registered in the companion service. - `ShimulatorVideoInjection.armedEnvironmentVariable` names the variable the shim already reads. Reviewed By: williamtwilson Differential Revision: D124771859 fbshipit-source-id: 4bf47df664ac29d83e2075af9f13fbf97dc23c89
| Commit: | 30c12e4 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Remove the instruments_run RPC Summary: The companion no longer serves `instruments_run`. It drove `/usr/bin/instruments`, which current Xcode no longer ships, and no client calls it since `idb instruments` was removed. The RPC, its request and response messages, and its method handler are deleted from `idb.proto` and the companion. Clients built against an older `idb.proto` that still call `instruments_run` now get `UNIMPLEMENTED` instead of an error from the missing tool. Reviewed By: passy Differential Revision: D125441003 fbshipit-source-id: f5950fce42fe8a1fb7248743f4d2b68221de0fc4
| Commit: | d7e8dbc | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add an ax-coresimulator backend that reads through CoreSimulator's own client Summary: idb has two host accessibility backends. `ax` reads over idb's own connection to CoreSimulatorBridge's accessibility service, falling back to CoreSimulator's client when that service cannot be reached, as it does today. The new `ax-coresimulator` sends the same reads through CoreSimulator's own client (`-[SimDevice sendAccessibilityRequestAsync:…]`) every time. - **Framework:** `UIAutomationBackend.coreSimulatorAccessibility`, named `ax-coresimulator` in a `complete` document. `.accessibility` is unchanged, so existing callers are unaffected. The CoreSimulator-client commands are memoized per simulator apart from the bridge's. - **Companion:** `AccessibilityInfoRequest.Backend.AX_CORESIMULATOR` selects it for reads and actions. An older companion does not recognize the value and serves the read with its default backend, as it does any value it does not know. - **Telemetry:** a read reports `ax-coresimulator` as its backend and `coresimulator` as its transport. Reviewed By: williamtwilson Differential Revision: D125452102 fbshipit-source-id: de3b20fbe21849489511b18800515f0f0177825c
| Commit: | 8763a3c | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Carry a requesting client on accessibility_info Summary: `AccessibilityInfoRequest` gains `client_type`: the assistive client a read claims to be, which decides whether the application answers with its automation tree or the flattened tree VoiceOver reads. The companion passes it to the read as `AccessibilityRequestOptions.clientType`. - **Compatibility:** `CLIENT_TYPE_UNSPECIFIED` claims no client, the historical read, so an existing client is unaffected. An older companion ignores the field. - **Mapping:** the enum has one value per client type. Its numbers are the proto's own, not the accessibility translator's integers, and the companion maps each by name. - **Unrecognized values:** a value the companion doesn't recognize is refused with `INVALID_ARGUMENT` rather than dropped. A read that silently claimed no client would answer with a different tree than the one asked for. - **Traversal:** idb has no traversal option, so an axbridge read uses the automatic traversal, which walks `semantic` when a client is named. No client sets the field yet; the next diff adds `--client-type`. Reviewed By: williamtwilson Differential Revision: D124765670 fbshipit-source-id: 94d796ca3555c89787bf3d0b70d3e01bc9dc3000
| Commit: | b12b8f6 | |
|---|---|---|
| Author: | Pavel Grafkin | |
| Committer: | meta-codesync[bot] | |
Expose device port forwarding through gRPC Summary: Clients connected to a remote companion need access to services listening on the physical device without establishing a separate USBMux transport. Add the bidirectional `forward_port` RPC to carry device-port traffic over the existing idb connection. Each RPC opens one independent USBMux connection, so simultaneous forwards remain isolated, including forwards to the same device port. The opening request specifies the device port. The companion checks its explicit port allowlist before connecting; omitted or empty allowlists disable forwarding. Data frames are bounded to 64 KiB. Request completion finishes accepted writes and allows a bounded response drain; device EOF, cancellation, and failures close the socket and cancel outstanding work. If the response drain expires, the RPC returns `DEADLINE_EXCEEDED` rather than treating truncated responses as a successful completion. The companion help documents the forwarding allowlist and its disabled default. Differential Revision: D124811851 fbshipit-source-id: f86ab571de55f8be559d255afa60ef8549d0314c
| Commit: | 1412d55 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add profile RPC to the companion Summary: The companion now serves a bidirectional `profile` RPC, so any client can profile a simulator target and get a typed report back, without depending on the tools being on the client's machine. The client sends `Start` with a target (`pid`, `bundle_id`, `launch_bundle_id` or `all_processes`) and one kind of profile: `leaks`, `memgraph`, `heap`, `sample`, `vmmap`, `footprint`, `resources` or `trace`. Unset values take the profiler's defaults: a 10 second sample, a 1 second resources interval, and the Time Profiler template. The companion replies in this order: - **Samples:** a `ProfileResourceSample` for each `resources` sample, as it is taken. - **The result:** exactly one `Result`, holding a typed `ProfileReport` (unset for `resources`) and the tool's raw output. - **The artifact:** if `include_artifact` was set, the memgraph or `.trace` bundle as a single gzipped tar, streamed in chunks. The session ends when the profiler does: - **`Stop` from the client:** stops it early and keeps what it recorded. - **Half-closing the request stream:** does not stop it. A client can send `Start` alone and wait. - **Tool failure or early exit:** fails the RPC with the tool's output instead of waiting for a stop. - **A request other than `Stop`, or the client going away:** abandons the profiler and fails the RPC. Profiling a device returns `UNIMPLEMENTED`. Differential Revision: D123051519 fbshipit-source-id: f22111e1f2de4ade2705c9946b98d55ce21341bc
| Commit: | a24e295 | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Serve inject_audio from the companion Summary: Add the client-streaming `inject_audio` RPC and companion handler for simulator microphone injection. A local companion receives one validated regular-file path; a remote companion receives bounded raw WAV data, materialised as a scoped temporary file before injection. Archives and compression are rejected. Update the generated Swift/Rust service surfaces, fake companion and schema contracts together so both clients and servers expose the same method. Reviewed By: williamtwilson Differential Revision: D119943639 fbshipit-source-id: e06fcdb385afa4ef665c2c371043a980da1f3313
| Commit: | dff9614 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Document the install telemetry columns and completion line Summary: Documents what an `install` call reports, which dashboards and the install benchmark read: every column, its type or values, and when it is set, along with the `{column=value, ...}` suffix on the completion log line. Also comments `InstallResponse` in `idb.proto`: `name`/`uuid` are the final response, and `progress` is an intermediate download percentage, from 0 to 100, sent only for apps. Two tests hold the contract: - the columns a set of installs reports between them (a download, a stream that fell back to its spool, a failed TLS download after the client cancelled) are exactly the documented ones, so a column can't be added or renamed without the docs; - the enumerated columns take exactly the documented values. Reviewed By: williamtwilson Differential Revision: D124091486 fbshipit-source-id: a00614539c15de51064af7fb694bfc4235d4a528
| Commit: | 3d089af | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Advertise zip stream destinations in CompanionInfo Summary: A companion now lists, in `CompanionInfo.zip_stream_destinations`, the install destinations whose stream it reads as a zip, telling it apart from a tar by its first bytes: app, xctest, dSYM and framework. Together with `zstd_zip_streams`, a client can tell whether a zip, or a zstd-compressed zip, is safe to stream for a given destination. A companion that predates the field leaves it empty, which a client reads as only an app stream taking a zip. Reviewed By: williamtwilson Differential Revision: D123268064 fbshipit-source-id: dce15c65aea4950ba0ede25464b3f196b25de680
| Commit: | 7a182ef | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Document the order of install request frames Summary: No behavioral change. Documents the shape of an install request stream in `idb.proto`: the destination first, then each option at most once, then the payload, with the compression frame counting as an option. It records that current companions accept the options in any order while older ones accept only one, which is the order clients send. Differential Revision: D123006880 fbshipit-source-id: 014095c684b106662fcd2b8fb7820531deefb64a
| Commit: | 18d0c4a | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Report a simulator's displays in describe Summary: `describe` on a booted simulator now lists every display it reports: the display's unique ID, the runtime's name for it, whether the guest is presenting on it, whether it is built in, and its pixel size and density in the current orientation. A size that is not a whole, non-negative number of pixels is reported as 0. This is how a client finds the display to name when it needs a specific one, such as the cover or inner display of an iPhone Duo. The displays are read from the simulator on each `describe`. A failed read is logged and leaves the list empty rather than failing the description, and any other target, or a companion that predates the field, reports none. The client does not print them yet. Reviewed By: mavitalemeta Differential Revision: D122367988 fbshipit-source-id: 0556332d61e03dfed7099a6d83dedf8ca59259b9
| Commit: | 93375d8 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Accept zstd compressed zip app streams Summary: A companion with `pzstd` on its `PATH` now accepts an `.ipa` (or any zip) streamed as zstd, and advertises this with the new `CompanionInfo.zstd_zip_streams` field. Previously a streamed zip was always sent raw: zstd was only negotiated for tars of `.app` bundles. Stored (uncompressed) `.ipa` files are common since `ditto`-style deflate is slow, so a streamed zip of mostly-compressible Mach-O data is sent as-is over the wire. The stream is recognised by a leading zstd skippable frame carrying the tag `idb-zip`. A companion that sees it pipes the stream through `pzstd -d` into the spooled `.ipa`, then installs it exactly as an uncompressed zip. `pzstd` skips the frame itself, and a companion without this change would reject the stream rather than mis-install it. Receive telemetry still counts wire bytes, since the decompressor reads from the same stream the payload writer fills. The reviewed `CompanionService` schema golden now includes field 8, `zstd_zip_streams`. Reviewed By: williamtwilson Differential Revision: D122231487 fbshipit-source-id: 267d442f6ca02ca3ce221408b316cc1003df2dae
| Commit: | 74ea8bc | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Advertise the compressions a companion can extract Summary: The companion now reports which compressions it can extract an app stream from, in a new `supported_compressions` field on `CompanionInfo`, returned from `connect` and `describe`. GZIP is always listed. ZSTD is listed only when `pzstd`, which zstd extraction runs, is on the companion's `PATH`: macOS does not ship it, so a companion without it cannot extract the `--compression ZSTD` stream it would otherwise accept. No client acts on the field yet, so installs are unchanged. A companion that predates the field leaves it empty, which a client should read as GZIP only; that keeps the capability backwards compatible and free, since every client already calls `connect` before its first command. Reviewed By: williamtwilson Differential Revision: D122213763 fbshipit-source-id: 0cbba768194427d59315d1436008c53dd418de04
| Commit: | e2a6d7b | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Expose play/pause, volume and eject buttons Summary: `idb ui button` now accepts `PLAY_PAUSE`, `VOLUME_UP`, `VOLUME_DOWN` and `EJECT` alongside the existing `APPLE_PAY`, `HOME`, `LOCK`, `SIDE_BUTTON` and `SIRI`. The same values are available as `HIDButtonType` members to Python clients, in the Rust CLI grammar, and as new `HIDEvent.HIDButtonType` values on the wire. The companion already knew how to press these buttons; this makes them reachable over gRPC. `EJECT` is the HID Consumer Eject key: pressing it with a text field focused hides or shows the software keyboard without ending editing. The new enum values are appended, so existing clients and companions are unaffected. A new client that sends one of them to an older companion gets `INVALID_ARGUMENT` ("Unrecognized hid button type") rather than a silent no-op. Differential Revision: D121794607 fbshipit-source-id: 7193872d7e6823dcfcc15c4763f47c0330fb5534
| Commit: | c91b5c5 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
accessibility_quiescence gRPC stream Summary: The companion now streams an application's UI quiescence over a new server-streaming RPC, `accessibility_quiescence`. Each response carries the pid it is about and one event: a state change (`BUSY` with the unanswered signals, `SETTLING`, or `QUIET`), a completed touch sequence, a change of target when following the frontmost application, or the application exiting, which is the last response. The stream runs until the client cancels, and cancelling closes the guest that measures it. - The request names an application by `pid` or `bundle_id`; naming neither follows the frontmost application. - `busy_threshold_ms` and `quiet_window_ms` are optional, and an unset tunable takes the companion's default. Each sits in its own oneof so that presence is on the wire, because zero is a meaningful quiet window: it answers as soon as nothing is busy. - Only simulator targets are supported, measured on the companion's own axbridge guest. The Rust wire-contract pins (schema golden, method counts, generated-surface test, and fake companion) and the companion's telemetry method-name list now include the new RPC. Reviewed By: williamtwilson Differential Revision: D121773181 fbshipit-source-id: 8faad9841c1ca43c525927ba235fc57dbb2a07f1
| Commit: | 3541eac | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
clear_delivered_notifications RPC on the companion Summary: The companion gains a unary `clear_delivered_notifications` RPC, taking a `bundle_id` and answering an empty response once every notification the simulator holds for that app has been withdrawn. It is served by `SimulatorNotificationCommands.clearDeliveredNotifications(forBundleID:)`, the counterpart of the existing `delivered_notifications` RPC. The Rust schema inventory, generated-surface check and fake companion are updated for the new method; the fake answers it `UNIMPLEMENTED`, as it does every method no client test has needed yet. The fake companion's README had fallen behind at 48 methods, so its count moves to 52 rather than 49. Differential Revision: D121242962 fbshipit-source-id: 78e281ea65c3a41b300c8f65ec73da6e844f9fe3
| Commit: | e220a37 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add `idb rotation` Summary: Expose `idb rotation [ORIENTATION]`: omit the argument to read physical device orientation, or supply `PORTRAIT`, `PORTRAIT_UPSIDE_DOWN`, `LANDSCAPE_LEFT`, or `LANDSCAPE_RIGHT` to set it. Reads support plain text and `--json`, including unknown and face-up/down states. Use separate physical-orientation RPCs so the existing `idb ui rotate` and HID landscape convention remain compatible. Forward the native orientation commands through the companion and OneWorld, and update the Rust schema, parser grammar, and compatibility inventories. Hinge CLI support is in D120983978 below this diff. Reviewed By: mavitalemeta Differential Revision: D121017722 fbshipit-source-id: afcb98752aae9aa2c499119141a79fbd002f3e1b
| Commit: | d314843 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add `idb hinge` Summary: Expose `idb hinge [ANGLE]`: no angle reads the current measured hinge angle, and one angle sets it. Reads support plain text and `--json`; writes accept finite values from 0 (closed) to 180 (flat). Delegate to the native hinge commands through the existing HID stream for writes and a unary hinge-angle RPC for reads. Forward the API through OneWorld and keep the Rust schema and generated parser inventories consistent. The Jest serialization configuration is isolated in its own prerequisite to respect the per-commit Jest change boundary. Reserve HID field 7, which the earlier experimental display-selection client used. Rotation CLI support is a separate follow-up. Reviewed By: mavitalemeta Differential Revision: D120983978 fbshipit-source-id: 9a4348be04b533b0d7842d6a41741fccb99c90db
| Commit: | de12834 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add structured wait responses Summary: Add a wait-specific response message that keeps the outcome, explanation, and diagnostics together while retaining the existing enum field for older clients. | Contract | Before | After | | --- | --- | --- | | Wait outcome | `wait_result = 1` reports found or timed out. | The existing field is unchanged; optional `wait = 2` contains `result`, `message`, and `diagnostics`. | | Diagnostics | Not represented. | `wait.diagnostics` carries `unmatched_values`, `truncated`, and `read_error`. Absence remains distinct from an empty sample. | | Runtime behavior | Producers emit the original response. | Unchanged in this schema-only diff; endpoint adoption follows separately. | Push safety: field 1 retains its enum type and values. Older readers ignore `wait`; new readers can fall back to field 1 when `wait` is absent. The companion will populate both outcomes from the same value. Empty `read_error` means no reported read failure, following proto3 string defaults. Update the schema inventory golden with the contract. Reviewed By: williamtwilson Differential Revision: D120985678 fbshipit-source-id: 43155b9f36e700ba613891f7c9d1e5311a452985
| Commit: | 5dd505e | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Serve accessibility actions from the requested backend Summary: `tap`, `scroll`, `set_value` and `drag` are now served by the backend the request names, instead of always by the host accessibility backend. The companion has been able to tap, set a value and scroll through the guest reader since that backend landed — `AXBridgeUIAutomation` implements all of them — but `IDBCommandExecutor` passed a literal host backend at every call site, so none of it was reachable over gRPC. The visible symptom is a marker that a read finds and an action cannot: web content inside Safari lives in its own process, which only the guest reader can see, so `describe --api axbridge` resolves a link and a tap of the same marker fails with `elementNotFound`. The only way through was to read the frame and tap its centre by coordinate, which is exactly what addressing an element semantically is meant to replace. The request-level `backend` decides for every action, including wait. `Wait.backend` is read only when the request-level field is unset, so a client older than that field keeps selecting a backend for wait and a client that sets both is not given a merge of the two. An unrecognized backend is refused rather than quietly served by the default, matching how an unrecognized scroll direction and match key are already treated. Reviewed By: bryanyantx Differential Revision: D120710572 fbshipit-source-id: 84800e9d445a224c66ae9cf9ba01f969505406a4
| Commit: | 86b52bc | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Pin the backend dropped from accessibility actions Summary: No behavioural change. Adds `backend` to `AccessibilityActionRequest` so a client can say which accessibility backend should serve an action, and pins the fact that the companion currently ignores it. `AccessibilityInfoRequest` has carried a `backend` since reads became selectable, and `AccessibilityActionRequest.Wait` has its own copy, but tap, scroll, set_value and drag have no way to express one at all. The new field sits on the request rather than on each action, so it covers wait too; `Wait.backend` is marked deprecated and stays on the wire, since a client older than the request-level field still uses it. Nothing reads the new field yet. The tests here assert the current behaviour — every action but wait drops the requested backend in translation, and wait reads only its own field — each marked as pinning a bug, so the commit that honours the field has something to flip. They also cover the untargeted scroll that resolves to the frontmost application, which is the case a backend switch is most likely to break. `AccessibilityActionMethodHandlerTests` is new: the handler had no unit coverage before the seam it is written against existed. Reviewed By: bryanyantx Differential Revision: D120710571 fbshipit-source-id: 8c9bddad7f2d7f355e315187ab3a8d025b4a3865
| Commit: | 0ed0b33 | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
delivered_notifications RPC on the companion Summary: Exposes the delivered-notification read over the companion's gRPC surface `delivered_notifications` is a unary RPC taking a bundle id and answering with the records the system retained for that app: identifier, title, subtitle, body, thread identifier, and a date. `date` is carried in an ordinary `oneof` -- explicit presence, so a record that carried no date is distinguishable from one dated at the epoch, without requiring proto3-optional support from the code generators. The existing Python build floors therefore remain unchanged. The handler only sets `date` when the value is there, and the strings are always present, empty where the notification had nothing. Reviewed By: lawrencelomax Differential Revision: D120003399 fbshipit-source-id: 91f647df4ab992cfe8577e0d45c722277dacecc7
| Commit: | 0905d92 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Expose native accessibility waits through `ui wait` Summary: Add `idb ui wait MARKER` and the Python client's `accessibility_wait` API, using the simulator's native accessibility polling. The command matches the existing simulator CLI options and defaults: case-sensitive substring matching, `--match-key AXLabel`, `--api axbridge`, `--timeout 10`, and `--poll-interval 0.5`. With `--json`, a match reports `{"found": true}` and a timeout reports `{"found": false}` with a nonzero exit. Invalid requests, cancellation, and operation failures remain errors rather than being converted to timeout results. This waits for element presence; it does not establish visibility or hittability. Reviewed By: williamtwilson Differential Revision: D119696153 fbshipit-source-id: e8530bee1b141af4f7c9dc5014c0536e6a63eacd
| Commit: | 15a9694 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Drop the deprecated bundle_id install request Summary: The install stream no longer accepts the bare `bundle_id` form of linking a dSYM to a bundle. That oneof case was marked for removal in March 2022 when `link_dsym_to_bundle` replaced it, and the client has sent the replacement ever since, so no request reaching the companion carries it. Tag 5 and the name are reserved so nothing can reuse them. Differential Revision: D119092114 fbshipit-source-id: 45d0c798968ae166207e292a6228f6169a002304
| Commit: | ef0f7e0 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Carry ignore-case on accessibility action requests Summary: AccessibilityActionRequest gains an ignore_case field covering the source marker and, on a drag, the destination marker; the abstract Client protocol declares it and the four python action methods accept and forward it. The field defaults to false, so older clients match case-sensitively as before and older companions ignore it. Behavioral coverage lands with the companion translation and CLI flag commits, which assert the wire-to-query and flag-to-client seams. No behavioral change. ___ Differential Revision: D118479170 fbshipit-source-id: 972aaddceaf62e3d0e5505c9860c11755955ae03
| Commit: | 69ff22f | |
|---|---|---|
| Author: | Will Wilson | |
| Committer: | meta-codesync[bot] | |
--match, --ignore-case and --filter on idb ui describe-all Summary: Second of five. Wires `FBAccessibilityMatch` — added in the previous diff — to the wire, so a caller can ask the companion for the elements they want instead of asking for the whole tree and narrowing it themselves. `idb ui describe-all` gains: --match TEXT report only the elements whose --match-key value contains TEXT --match-key KEY which attribute --match searches (AXLabel by default; the same vocabulary `describe` uses) --ignore-case compare --match case-insensitively --filter {all,interactable} which elements the read reports (all by default) `--filter` is not new behaviour, only newly reachable: `FBAccessibilityElementFilter` has had an `.interactable` case since it was written, and nothing on the wire could ever select it. A match is not a marker. `describe MARKER` resolves to exactly one element and fails when there is none; `--match` reports every element that matches, and matching nothing is an empty result rather than an error. Setting both on one request is `INVALID_ARGUMENT` — there is no reading of "both" that is not a guess at which the caller meant — and the Python client refuses a match combined with a marker or point target before the call leaves the machine. Two ordering decisions are worth naming. The filter runs before the match, in one shared helper (`FBAccessibilityElementRetention.narrowing`) rather than at each call site, because both hoist and the order is observable. And both run before the interactable refinement, which is per-element guest work there is no reason to spend on an element that is about to be dropped. The Python request construction moved out of `client.py` into `idb/grpc/accessibility.py`, matching `idb/grpc/screenshot.py`: the branching is now a pure function over (target, options) and is unit-tested without a stub. Compatibility: `match`, `ignore_case` and `filter` are new proto3 scalars, so an older companion silently drops them and serves a full, correct-looking tree. The client-side re-filter and warning that closes that gap is the fifth diff in this stack; until it lands, `--match` against an old companion under-narrows rather than misreports. `FILTER_ALL` is zero, so a request that does not ask and a dropped field are the same read. Reviewed By: bryanyantx Differential Revision: D117753208 fbshipit-source-id: 3f81168d68667b6ae1b18a9b08d22e75776ed382
| Commit: | 5b115a6 | |
|---|---|---|
| Author: | Will Wilson | |
| Committer: | meta-codesync[bot] | |
Encode options on RecordRequest.Start Summary: `idb video` records at a fixed 30fps, full size, with whatever bitrate the encoder picks. `idb video-stream` has taken fps, compression quality, scale factor, average bitrate and key frame rate since it was written. Same framebuffer, same encoder, same configuration type -- the record path just never plumbed them. Adds those fields to `RecordRequest.Start`, reusing `VideoStreamRequest.Start`'s field names and numbers so the two messages read identically. Field 3 is left unallocated: that is `format` on the sibling, and a recording is always H.264 in an mp4. One deliberate divergence. Zero means "use the default" for both messages, but record's default `fps` is 30 rather than the stream's nil, because `FBSimulatorVideoRecordingCommands.recordingConfiguration` pins `framesPerSecond: 30`. That is what makes an all-zero request -- everything the current client sends -- record exactly as it does today. Also adds `RecordResponse.Applied`, the resolved options echoed back. A scalar field added to an existing message is invisible when it is dropped: a companion older than this change ignores `scale_factor` and records full size, successfully. The echo is the detector. It is sent only when the request set at least one of the new fields, so the response stream shape changes only for requests an old client could not have produced. No behaviour change: nothing reads the new fields yet. Reviewed By: lawrencelomax Differential Revision: D117613118 fbshipit-source-id: 7cd754426969806095db27c50186e9fbd27cb718
| Commit: | 98df804 | |
|---|---|---|
| Author: | Will Wilson | |
| Committer: | meta-codesync[bot] | |
Add a drag action to the accessibility gRPC API Summary: Adds `AccessibilityActionRequest.Drag`, a new member of the existing `action` oneof, describing a press-and-drag gesture: press and hold the request's target, move to a destination, and release. The destination reuses the shape the request already has for its source -- a marker with its own match key and depth, a point, or nothing for the frontmost element -- so no existing message changes. The three durations and the interpolation delta each read zero as "use the server default", which is how the HID messages already treat their optional timings. Proto only. The companion and the client follow in this stack. Reviewed By: lawrencelomax Differential Revision: D117613111 fbshipit-source-id: 1ca46bcb4cde92948349f8024a8a10771c0b51d9
| Commit: | d616be5 | |
|---|---|---|
| Author: | Will Wilson | |
| Committer: | meta-codesync[bot] | |
Give ScreenshotRequest the fields callers already want Summary: First diff of a stack adding a real `screenshot` API to idb. This one is proto only: no behaviour changes, nothing reads the new fields yet. `ScreenshotRequest` has been an empty message since it was written, so the RPC can only ever return a full-size PNG. A client that wants anything else -- a different format, a quality setting, a crop, or a smaller image -- has to do it itself, after the full-size PNG has already been encoded and shipped over the wire. Client-side scaling in particular saves no bytes at all: it shrinks the file on disk long after the cost of transferring the full-size one was paid. This fills the request message in. Every knob is named after the equivalent on `VideoStreamRequest.Start`, which already has `format`, `compression_quality` and `scale_factor` with these exact semantics -- including `compression_quality == 0` meaning "server default", as in VideoStreamMethodHandler.swift. The `oneof scale` follows the shape of `RecordRequest.control` and `VideoStreamRequest.control`, and the `POINTS` unit is the coordinate space `tap`, `swipe` and `describe` already use. Transforms are specified to apply crop -> scale -> encode, so the scaler never touches pixels that are about to be discarded and the encoder never sees a full-size bitmap. Later diffs implement that ordering companion-side, before rasterisation, rather than resizing an image that has already been rendered. `ScreenshotResponse.image_format` has been declared and never populated since the message was written. Later diffs populate it, which doubles as a version handshake: proto3 silently ignores unknown fields, so a new client talking to an old companion would otherwise get a full-size PNG back with no error. A companion that leaves `image_format` empty predates this change and has ignored every request field, which the client can detect and refuse. Every field is new and every default reproduces today's behaviour byte for byte, so an unmodified client against a new companion sees no change. Reviewed By: lawrencelomax Differential Revision: D117231687 fbshipit-source-id: 87ed0f18633a7fe242cac871b140e25d6fc36a7b
| Commit: | 09b5ecd | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Request profiling and frame coverage on accessibility reads Summary: `ui describe-all` and `ui describe-point` gain `--profile` (element counts and timings) and `--collect-frame-coverage` (upper-region frame coverage), carried on the wire as two request booleans. The results are reported by `--format complete` only, in the document's always-present `profile` and `coverage` slots — the legacy formats collect but have nowhere to report, so their output is byte-unchanged whether or not the enrichers are requested. No conditional response shape is introduced; the output format remains solely the caller's `--format` choice. An older server ignores the unknown request fields and serves the read unenriched, consistent with the rest of the request surface. ___ Differential Revision: D115049152 fbshipit-source-id: 45da00e835e425b5b68c9ed2c72a77bda5844b55
| Commit: | 08a4eb3 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Serve the complete accessibility output format Summary: `AccessibilityInfoRequest.Format` gains `COMPLETE`: a consolidated document carrying the element tree plus the read's provenance — which backend served it, what was targeted, screen bounds, truncation, and any blocking modal — with every key always present, so consumers parse one shape regardless of verb or backend. The server maps it straight onto the format-aware encoder introduced in the previous change; the legacy formats are byte-untouched. Compatibility follows the same rules as the backend selector: a server that predates this value falls back to the legacy format via its existing unrecognized-value handling, and because the complete document is shape-detectable (an object naming its `backend`), a client can tell the downgrade apart from the real thing. Server-side only: nothing sends the value yet; the client flag follows separately. Reviewed By: williamtwilson Differential Revision: D115028625 fbshipit-source-id: e041a65c3d62fd4f07434bc8274b0ab799642cfa
| Commit: | 2fec6df | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Select the accessibility read backend over the wire Summary: `AccessibilityInfoRequest` gains a `Backend` enum (`AX`, `AXBRIDGE`, `AXBRIDGE_PERSISTENT`) selecting which backend serves the read. `AXBRIDGE` reads via a guest accessibility reader spawned per read; `AXBRIDGE_PERSISTENT` keeps that reader alive on the server, amortizing repeated reads. The output schema is identical across backends, so a caller switching backends sees the same shape. Compatibility is explicit in the wire design: `BACKEND_UNSPECIFIED` (an older client, or one that does not ask) and an unrecognized value from a newer client both preserve the historical read path, and an older server ignores the field entirely — a new client against an old server gets exactly the old behaviour. When the selected backend cannot run (e.g. the guest reader binary is missing from the server's resources), the call fails with a clear error rather than silently downgrading. Server-side only: nothing sends the field yet; the client flag follows separately. Reviewed By: williamtwilson Differential Revision: D114915998 fbshipit-source-id: 705cfe1a7b1f7af2af49eb66da4e846038df3400
| Commit: | bb719ac | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add accessibility key selection to ui describe-all Summary: `idb ui describe-all` (and `describe-point`) now accept `--key <name>` (repeatable) to restrict the described accessibility keys to a chosen set; omitting it returns the default key set. An all-invalid `--key` list is rejected with `invalidArgument` rather than silently falling back to the defaults and masking a typo. The response shape is unchanged — the historical bare elements array. Reviewed By: xgerrit Differential Revision: D112597925 fbshipit-source-id: d256b65cd1557d2bb0285878253911923d51237b
| Commit: | 6b8a220 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add ui set-value by accessibility element Summary: Adds `idb ui set-value <marker|x y> --value <v>`, which sets the accessibility value of a resolved element (a marker or a point). `--match-key` and `--depth` control marker resolution. The write goes through the consolidated `accessibility_action` RPC: a `SetValue` variant (carrying the value) is added to its `action` oneof. The companion resolves the target and sets the value via the shared `FBSimulatorControl` path, and the Python client gains `accessibility_set_value`. Reviewed By: xgerrit Differential Revision: D113216216 fbshipit-source-id: 12293211f39aeaf82d0af0e0920cea4659faf651
| Commit: | 13f42dd | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add ui scroll by accessibility element Summary: Adds `idb ui scroll <direction> [<marker|x y>]`, which scrolls a resolved accessibility element — a marker, a point, or (when no target is given) the frontmost app. Directions are up/down/left/right/visible. The write goes through the consolidated `accessibility_action` RPC: a `Scroll` variant (carrying the direction) is added to its `action` oneof. The companion resolves the target and scrolls via the shared `FBSimulatorControl` path, and the Python client gains `accessibility_scroll`. Reviewed By: xgerrit Differential Revision: D112597926 fbshipit-source-id: 8614bc6d865dc45b9a01d3669ca8baabaabee2e0
| Commit: | 1f6943f | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Use the default app when no bundle id is specified for `app` context Summary: ### This diff * Updates `idb-repl` to accept an `app` context with no bundle id. * Adds app installation for the default `ReplHost` app when no other app is specified for the `app` context. Reviewed By: bryanyantx Differential Revision: D113353092 fbshipit-source-id: ae99adf16097576cca97f1968576458e42e7df64
| Commit: | fa6bd47 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add ui describe by accessibility marker Summary: Adds `idb ui describe <marker>`, which resolves the accessibility element whose value contains the marker and prints its serialized subtree. `--match-key` selects the searchable key (AXLabel default), `--depth` bounds the search, and `--nested` selects the nested format. Rather than a new RPC, this extends the existing `accessibility_info` read: `AccessibilityInfoRequest` gains an optional marker target (plus match key and depth), and the companion resolves and serializes it via the shared `FBSimulatorControl` describe path. `describe-all` (whole screen) and `describe-point` (point) are unchanged; the Python client's `accessibility_info` gains the marker target and the `describe` CLI command routes through it. Reviewed By: xgerrit Differential Revision: D112597919 fbshipit-source-id: 46c46e57dba2b07e8692098907604583b6091630
| Commit: | 23da9bc | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Support accessibility tap by marker, point, key and expected value Summary: Extends `idb ui tap` beyond coordinate HID taps with a first-class accessibility (AXPress) path: - `idb ui tap <x> <y> --api ax` resolves the accessibility element at the point and presses it instead of sending a coordinate touch. - `idb ui tap <marker>` resolves an element whose accessibility value contains the marker and presses it. `--match-key` selects the searchable key (AXLabel default, plus AXUniqueId/AXValue/title/role/...), `--depth` bounds the tree search, and `--expected-value`/`--expected-key` assert the element's value before pressing. `idb ui tap <x> <y>` (coordinate HID tap) is unchanged. Introduces the `accessibility_action` RPC: its request carries a marker-or-point target, match key and depth, plus an `action` oneof whose `Tap` variant holds the optional expected value/key. The companion resolves the target and presses via the shared `FBSimulatorControl` accessibility path, and the Python client gains `accessibility_tap`. Reviewed By: xgerrit Differential Revision: D112597920 fbshipit-source-id: 4e0f8be21b821c2b727eaf9502048f4b38e7db92
| Commit: | 6b4df7f | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add ui rotate gesture Summary: Adds `idb ui rotate <ORIENTATION>`, which sets the device orientation (PORTRAIT, PORTRAIT_UPSIDE_DOWN, LANDSCAPE_LEFT, LANDSCAPE_RIGHT). It rides the existing `hid` streaming RPC: a `HIDOrientation` member is added to the `HIDEvent` oneof, the companion maps it to the `FBSimulatorControl` device-orientation HID event, and the Python client gains a `rotate` method plus the `ui rotate` CLI command. Reviewed By: xgerrit Differential Revision: D112597923 fbshipit-source-id: 29c3ea15fdccdb961693d6864a0ad3ba9012b0c7
| Commit: | 82682b6 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | meta-codesync[bot] | |
Add ui shake gesture Summary: Adds `idb ui shake`, which shakes the device. It rides the existing `hid` streaming RPC: an empty `HIDShake` member is added to the `HIDEvent` oneof, the companion maps it to the `FBSimulatorControl` shake HID event, and the Python client gains a `shake` method plus the `ui shake` CLI command. Reviewed By: xgerrit Differential Revision: D113216217 fbshipit-source-id: c8f0f2767f3f412bfd0e3504c4496a480e40bcfb
| Commit: | ebc6ac7 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Add session report appending Summary: ### This diff * Adds a session id to link invocations that run code in the same session. * Adds session report appending so multiple one-shot runs can be combined into a session report. Reviewed By: bryanyantx Differential Revision: D113052532 fbshipit-source-id: da5803016558d4da32968abe1e350811c693c9f3
| Commit: | 8989ac3 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Transfer captured artifacts back to the client Summary: ### This diff Moves artifacts captured from repl code from the companion back to `idb-repl`. Reviewed By: bryanyantx Differential Revision: D113017950 fbshipit-source-id: dc5e18162f50a3f728fde53e1d59662c0ce16007
| Commit: | 6121dd0 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Add `--enable-repl` flag when launching an app Summary: ### Context Currently `idb-repl` has to launch an app for it to be available for code injection. It would be great if we could use multiple tools on the same app instance. (For ex. Driving an app with `idb` then using `idb-repl` to pull app state.) ### This diff Adds a new flag to `idb` when launching an app that enables REPL in the app. This makes it possible to prepare an app for `idb-repl` before it's ever needed. Reviewed By: bryanyantx Differential Revision: D112843990 fbshipit-source-id: 5840f1b889ea9562944e43930f22f692e4c74e6c
| Commit: | 7ea5964 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Make `app` context sessions reattachable Summary: ### Context Currently `idb-repl` relaunches the app for every session when using the `app` context. The problem with this is that agents seem to prefer one-shot sessions and one-shot sessions relaunch the app every time, but resetting the app on every execution is extremely limiting. ### This diff Changes `app` context sessions so they will by default look for any existing session and attempt to connect to it. Using a new CLI flag (`--fresh`) it's possible to still force an app relaunch. Reviewed By: bryanyantx Differential Revision: D112630600 fbshipit-source-id: 5e0d04db80d117e0709fcb7f65dc4f050feeb884
| Commit: | 6ebb6d1 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Match the targeted OS version to the runtime OS version Summary: ### Context When building repl code, it can't use or link against symbols that are for a newer version of iOS than what is available in the iOS simulator. ### This diff * Sends the runtime OS version back in the "repl ready" message at the start of the session, and uses the OS version to cap the OS version used for building. * Adds tests for the OS version resolution used when generating the target triple. Reviewed By: bryanyantx Differential Revision: D112584181 fbshipit-source-id: b1d88cbac31c06372e8fe0dcbba48486bc36c07d
| Commit: | 8a4a725 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Add the `app` context to `idb-companion` and `idb-repl` Summary: ### Context Currently we can inject code into a bare simulator process or an `xctest` process. It would be useful to inject code into a running app, so we'll create a new context to do that. ### This diff Adds the `app` context option to `idb-companion` and `idb-repl`. Differential Revision: D110426036 fbshipit-source-id: c42d68f09f86bf2ef433ba7575b506ffa17d57b5
| Commit: | 2076c5b | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Transfer `IDB` Swift interface from companion to client Summary: ### Context It would useful if repl code can actually use `idb` commands from within the code and use the results to make decisions at runtime. This means we need to expose an API to the repl code to call `idb` commands, then link that into the ReplExecutor and send those commands back to the companion. ### This diff Updates the Repl Ready command to contain the actual `.swiftinterface` for the `IDB` API supported by repl commands, instead of just a file path. (This will support remote connections better down the road.) Reviewed By: lawrencelomax Differential Revision: D110232228 fbshipit-source-id: 00af9fae11b8421d24b95b1156efa6e7b832c627
| Commit: | ae1069d | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Pass .swiftinterface files back to client Summary: ### Context In order to link from user repl code to functions and types in a test binary, the MVP required the module map that was an artifact of building the test binary. This is problematic for a lot of reasons, so we need another way to extract the functions and types users may want to link to. ### This stack Adds runtime generation of a `.swiftinterface` that can be used to link to test binary code. ### This diff Adds passing of the generated `.swiftinterface`s from the shim to `idb-repl`. Reviewed By: lawrencelomax Differential Revision: D110008579 fbshipit-source-id: 8d44a44da3962036e46b314f813f51d34ec95785
| Commit: | 3308a1e | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Use the simulator device family to select the build platform Summary: ### This stack Expands on `idb-repl` to simplify its setup and use by integrating it more with `idb`. ### This diff * Adds the simulator device family to the `repl ready` response. * Uses the device family to select the build platform. Reviewed By: lawrencelomax Differential Revision: D108571571 fbshipit-source-id: 68a111a0a55d4f34dfc70df50b9c355be5d1e52f
| Commit: | 728daa9 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Create separate repl execution contexts Summary: ### This stack Starts cleaning up and addressing the rough edges and gaps from the `idb-repl` MVP. ### Context The are advantages and disadvantages to running code in different environments, so ideally, this should be a user selectable option. For ex. Instead of running code in a test environment (like in the MVP), it could be useful to run code inside an actual app or even a bare simulator process. ### This diff * Replaces the `idb-repl` `dylib` command (which previously specified the method of injecting code) with two new commands: `simulator` and `test`, which specify the context code should execute in. * Updates communication between `idb-repl` and `idb` to include the selected context. (Hooking this up will happen in a later diff in the stack.) Reviewed By: lawrencelomax Differential Revision: D107780981 fbshipit-source-id: cbdf896344d3027f429dc11b2cfc65cfe5f005e7
| Commit: | 790fc4b | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Create separate repl execution contexts Summary: ### This stack Starts cleaning up and addressing the rough edges and gaps from the `idb-repl` MVP. ### Context The are advantages and disadvantages to running code in different environments, so ideally, this should be a user selectable option. For ex. Instead of running code in a test environment (like in the MVP), it could be useful to run code inside an actual app or even a bare simulator process. ### This diff * Replaces the `idb-repl` `dylib` command (which previously specified the method of injecting code) with two new commands: `simulator` and `test`, which specify the context code should execute in. * Updates communication between `idb-repl` and `idb` to include the selected context. (Hooking this up will happen in a later diff in the stack.) Reviewed By: lawrencelomax Differential Revision: D107780981 fbshipit-source-id: cbdf896344d3027f429dc11b2cfc65cfe5f005e7
| Commit: | d144f4a | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Add the `repl` gRPC command Summary: ### This stack Integrates the `idb-repl` MVP into the `idb` codebase. The MVP is based on injecting code into the machinery that is currently used by test execution. ### This diff Adds an empty `repl` command for gRPC clients. Reviewed By: cpepin Differential Revision: D107197686 fbshipit-source-id: ec9567091733c61a2e0ed4d20efe354d8ed1023f
| Commit: | 8bc5db9 | |
|---|---|---|
| Author: | Gerrit Goossen | |
| Committer: | meta-codesync[bot] | |
Add the `repl` gRPC command Summary: ### This stack Integrates the `idb-repl` MVP into the `idb` codebase. The MVP is based on injecting code into the machinery that is currently used by test execution. ### This diff Adds an empty `repl` command for gRPC clients. Reviewed By: cpepin Differential Revision: D107197686 fbshipit-source-id: ec9567091733c61a2e0ed4d20efe354d8ed1023f
| Commit: | 5cc0c3d | |
|---|---|---|
| Author: | meta-codesync[bot] | |
| Committer: | GitHub | |
Re-sync with internal repository (#921) The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging. fbshipit-source-id: 9c54fc4d98215197c5e51e0109e5e7ffc2b2ef4d Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
| Commit: | 1cd3212 | |
|---|---|---|
| Author: | Facebook Community Bot | |
Re-sync with internal repository The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging. fbshipit-source-id: 9c54fc4d98215197c5e51e0109e5e7ffc2b2ef4d
| Commit: | 006cc30 | |
|---|---|---|
| Author: | Arsh Malhotra | |
| Committer: | meta-codesync[bot] | |
Handle HIDPinch gRPC events Summary: Add gRPC support for the pinch gesture in the idb companion. - idb.proto: add `HIDPinch` message (center, scale, duration, radius) to `HIDEvent.oneof` - HidMethodHandler.swift: handle `.pinch` case, forwarding to `FBSimulatorHIDEvent.pinchAt()` - CompanionServiceProvider.swift, CompanionServiceInterceptors.swift: add `FBControlCore` import Reviewed By: lawrencelomax Differential Revision: D101644851 fbshipit-source-id: be3ee0dc6d9d9a4c4f1e7916b0e7ac296fffdddd
| Commit: | d8f4d18 | |
|---|---|---|
| Author: | Arsh Malhotra | |
| Committer: | meta-codesync[bot] | |
Handle HIDPinch gRPC events Summary: Add gRPC support for the pinch gesture in the idb companion. - idb.proto: add `HIDPinch` message (center, scale, duration, radius) to `HIDEvent.oneof` - HidMethodHandler.swift: handle `.pinch` case, forwarding to `FBSimulatorHIDEvent.pinchAt()` - CompanionServiceProvider.swift, CompanionServiceInterceptors.swift: add `FBControlCore` import Reviewed By: lawrencelomax Differential Revision: D101644851 fbshipit-source-id: be3ee0dc6d9d9a4c4f1e7916b0e7ac296fffdddd
| Commit: | d3d509f | |
|---|---|---|
| Author: | Arsh Malhotra | |
| Committer: | Gerrit Goossen | |
Handle HIDPinch gRPC events Summary: Add gRPC support for the pinch gesture in the idb companion. - idb.proto: add `HIDPinch` message (center, scale, duration, radius) to `HIDEvent.oneof` - HidMethodHandler.swift: handle `.pinch` case, forwarding to `FBSimulatorHIDEvent.pinchAt()` - CompanionServiceProvider.swift, CompanionServiceInterceptors.swift: add `FBControlCore` import Reviewed By: lawrencelomax Differential Revision: D101644851 fbshipit-source-id: be3ee0dc6d9d9a4c4f1e7916b0e7ac296fffdddd
| Commit: | 6dc520f | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Add ability to clear photo library within idb companion Summary: SimulatorFrameworkBridge can be used to clear the photo library. This is similar to the capability added to clear contacts. This uses the Photos framework to access the photo library and clear it. The `kTCCServicePhotos` entitlement is needed for this to work even though it clears photos using private APIs. Private APIs needed to be used for this as the Photos framework will always show a destructive alert when we try to delete photos/videos from the device. Differential Revision: D87447670 Privacy Context Container: L1246528 fbshipit-source-id: 15b9bd13795abfcacf55be3c176a93d12a2820c2
| Commit: | 21a86be | |
|---|---|---|
| Author: | Chris White | |
| Committer: | meta-codesync[bot] | |
Add ability to clear contacts using Contacts framework within idb companion Summary: WhatsApp iOS jest tests exhibit flakiness when prepopulating the simulator's address book with contacts. The root cause is that simulators may retain contacts from previous test runs, and the current approach of directly manipulating `AddressBook.sqlite` causes database corruption and synchronization issues. This leaves the simulator in an inconsistent state where subsequent contact additions fail silently. Direct SQLite manipulation bypasses the Contacts framework's internal consistency checks, leading to sqlite errors which go unnoticed during test runs. `simctl` provides a way to add contacts, but it doesn't provide a way to specifically clean up contacts. **Whats New** -------- Clear contacts using the official `CNContactStore` API from Apple's Contacts framework, which maintains data integrity and properly synchronizes internal state. **Implementation** -------------- Since the Contacts framework requires special entitlements (`com.apple.private.tcc.allow` for `kTCCServiceAddressBook`) and must execute within the simulator's security context, I've created `SimulatorFrameworkBridge` - a helper binary that: 1. Targets iOS Simulator SDK and links against iOS frameworks 2. Contains required entitlements to bypass TCC permission dialogs 3. Executes via `simctl spawn` to run inside the simulator's process space 5. Built as a universal binary supporting both arm64 and x86_64 architectures This approach ensures contacts are cleared through the official API, preventing database corruption and eliminating test flakiness related to address book state. This also would make it possible to clean up the photo library between test runs, which would also be beneficial for the flakiness of tests. Reviewed By: xgerrit Differential Revision: D86180965 fbshipit-source-id: ccacb83225c1925c48296f86fe7d9368c8993a21
| Commit: | b930660 | |
|---|---|---|
| Author: | Maru Berezin | |
| Committer: | Facebook GitHub Bot | |
Rename option to --enable-continuous-coverage-collection Summary: Renamed the option to `--enable-continuous-coverage-collection` to avoid leaking too many implementation details of idb_companion to the idb client API. Reviewed By: jbardini Differential Revision: D48605430 fbshipit-source-id: 202f72309e49ce48739c4dae25027daecea481dd
The documentation is generated from this commit.
| Commit: | 011e53a | |
|---|---|---|
| Author: | Maru Berezin | |
| Committer: | Facebook GitHub Bot | |
Add --coverage-file-suffix option Summary: Added the option `--coverage-file-suffix` to add a suffix to the .profraw coverage file names generated after a test run. Reviewed By: Nekitosss Differential Revision: D48095797 fbshipit-source-id: d51104a711050d62d501c8b5cc2df2a92b526cf3
| Commit: | 70fb9cb | |
|---|---|---|
| Author: | Ron Mordechai | |
| Committer: | Facebook GitHub Bot | |
Allow configuring key frame rate for video streams Summary: Jest E2E videos are setting some terrible corruption mid stream: https://www.internalfb.com/intern/testinfra/diagnostics/5348024748728738.844425029855635.1691590430/. Probably a result of a missing frame or something—increasing the frequency of key frames should alleviate the issue. Reviewed By: Nekitosss Differential Revision: D48195347 fbshipit-source-id: cdd8de5f9c58d3ae06a97d710e7e8b83559810f3
| Commit: | 9550c4c | |
|---|---|---|
| Author: | Ivan Smetanin | |
| Committer: | Facebook GitHub Bot | |
Add an option to skip signing xctest bundles Reviewed By: jbardini, Nekitosss Differential Revision: D45392837 fbshipit-source-id: 7aaefedb7c1fab32c886f18f29c7578644b1e14e
| Commit: | a8239a0 | |
|---|---|---|
| Author: | Mark Bridges | |
| Committer: | Facebook GitHub Bot | |
Reporting Additional Test Failure Assertions Summary: See D42416051 Reviewed By: Nekitosss Differential Revision: D42412171 fbshipit-source-id: 7fff78ababf0e2f4f3b3aa67330f0443e6a3e1ab
| Commit: | f05a91e | |
|---|---|---|
| Author: | Alex Beals | |
| Committer: | Facebook GitHub Bot | |
Add in new command to revoke permissions Summary: This adds in the ability to reset permissions as a complement to `approve`. This naming mirrors the similar `adb` command `pm revoke` which is the opposite of `pm grant`. While this more closely mirrors `xcrun simctl privacy reset` than `xcrun simctl privacy revoke`, `reset` is a little too vague to be used as a top-level `idb` command, so here we are. Reviewed By: Nekitosss Differential Revision: D37928629 fbshipit-source-id: 4495baf39163209a3bd927a892c60e701ee3e9f8
| Commit: | 631f47d | |
|---|---|---|
| Author: | Nikita Patskov | |
| Committer: | Facebook GitHub Bot | |
Add userInfo to XCTAttachment in proto Summary: Created new property to pass attachment user info Reviewed By: lawrencelomax Differential Revision: D37454753 fbshipit-source-id: 9171c9b57c7d770e20fbb14611e19edcfbd8dad3
| Commit: | b8d8837 | |
|---|---|---|
| Author: | Jakub Grzmiel | |
| Committer: | Facebook GitHub Bot | |
Allow not returning bundle results from running xctest Summary: Do not send back the bundle results if client does not want to fetch it. Reviewed By: Nekitosss Differential Revision: D36494548 fbshipit-source-id: da11a608abd145457750d4465b405352b29a9b0e
| Commit: | dcd17cf | |
|---|---|---|
| Author: | Johnny Souza | |
| Committer: | Facebook GitHub Bot | |
Add flag to app install to ignore mtime in .ipa archives Summary: The instalation process of an `.ipa` on a simulator consists of idb decompressing the archive (ipa is a zip) and then calling `-[SimDevice installApplication:withOptions:error:]` which in turn will request the installation to `installd` (a process that belongs to the simulator). When a previous version of the app is already installed in the simulator, `installd` performs an "incremental install" (or "Delta patch update" as it shows in the logs). Since `installd` incremental patch update seems to be based on each file's modified date and size, it not work well when your `.ipa` is produced by a building system that normalises the timestamps of files contained in archive-like artefacts (all the content of all `.ipa`s have mtime set to a specific date in the past -- regardless of _when_ the build actually happened). This often results on a corrupted app installation with some files from the previous version and some files of the newer version. The files that are not updated are files which had their content changed but without a change in size. As the files from both builds have the same mtime, `installd` skip them. So we mitigate this issue by ignoring the mtime stored within the `.ipa` when decompressing it. So all the files in the app bundle have the current time as mtime, which will differ from the files previously installed, and `installd` will be able to install the newer version of the app properly. Since we are, in theory, forcing a full install, it can result in longer install times. There is also the possibility of unforeseen issues with applications that happen to depend on the mtime of specific resources within it's bundle, so we are making this new behaviour opt-in. Reviewed By: ronmrdechai, Nekitosss Differential Revision: D36341632 fbshipit-source-id: 53e48ae7b915c9a4e67a6ebe92dac507f27e3da8
| Commit: | 82a6701 | |
|---|---|---|
| Author: | Ruijie Chen | |
| Committer: | Facebook GitHub Bot | |
Adding support for test bundle_id Summary: Adding support for test bundle in idb_companion when installing dsym and link next to xctest bundle Reviewed By: Nekitosss Differential Revision: D34523586 fbshipit-source-id: 208c0c85a794fad2bd4bc1467acb091b291477d2
| Commit: | d0ca124 | |
|---|---|---|
| Author: | Andrey Kateshov | |
| Committer: | Facebook GitHub Bot | |
add microphone permissions in cli Summary: this adds a new future: support for granting microphone permissions. Reviewed By: jbardini Differential Revision: D34445262 fbshipit-source-id: 29370eeb66738f8183a603ce2e7d19a311682429
| Commit: | ad2d747 | |
|---|---|---|
| Author: | Yerken Tussupbekov | |
| Committer: | Facebook GitHub Bot | |
Add avg_bitrate to VideoStream request Summary: This will allow us to control encoder bitrate for IDB companion video-streaming through GRPC API Reviewed By: jamescoggan Differential Revision: D34213517 fbshipit-source-id: 4c04f33e1181ab5e618e44ea9842bb5b0ec6e3e4
| Commit: | 33147af | |
|---|---|---|
| Author: | Andrea Tullis | |
| Committer: | Facebook GitHub Bot | |
Support non string values for default values Summary: This diff adds support for non string values to the `idb set` family of commands. Reviewed By: ideahitme Differential Revision: D34144910 fbshipit-source-id: 7cef44beb521833dc2a1398fe320d6e9bc70b12b
| Commit: | 84ff882 | |
|---|---|---|
| Author: | Stefan Petrov | |
| Committer: | Facebook GitHub Bot | |
Add I420 video format flag to IDB companion GRPC Summary: Add I420 as a video format that can be requested from IDB companion through GRPC. Reviewed By: ideahitme Differential Revision: D34110642 fbshipit-source-id: af3d527476159ec0ff6a924e250b295e93d8698f
| Commit: | fea9e0f | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Add FileContainer.SYMBOLS for idb companion Summary: Now that we have a base implementation, this can be wrapped up in a file container Reviewed By: jbardini Differential Revision: D33187470 fbshipit-source-id: aab304581b83d7bf764316804d2797e21efb7ffd
| Commit: | 43a3ecc | |
|---|---|---|
| Author: | Andres Suarez | |
| Committer: | Facebook GitHub Bot | |
Update copyright headers from Facebook to Meta Reviewed By: aaronabramov Differential Revision: D33357161 fbshipit-source-id: 3e27660d7eb63fd4a40c366d6b226cac694396d5
| Commit: | 11cfdd7 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Add grpc interface for inspecting the companion's internal storage Summary: Another file container, this time for the files that idb uses to internally manage a number of different mechanisms. These only exist within idb itself, rather than the underlying frameworks Reviewed By: fgasperij Differential Revision: D32696566 fbshipit-source-id: 84fa4e8a6745a967adbee5a49aab541dbae22b7d
| Commit: | a02bf34 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Remove deprecated fields from LaunchResponse proto Summary: No longer used and has been unused for over two weeks in D31992199 (https://github.com/facebook/idb/commit/a47216f0cc943c94696d636af7921176b5e388af) , let's remove it from the protocol since it's no longer used and increasing transfer size due to the doubnling up. Reviewed By: jamescoggan Differential Revision: D31992217 fbshipit-source-id: 90bfe9e6cd4e27d74b8fb85b3c4b8d93dd94ba6d
| Commit: | 0ed5f89 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Add AUXILLARY container Summary: This is going to be helpful for commands that wish to use the aux dir internally Differential Revision: D32022253 fbshipit-source-id: 80a371dd69208d4f5ba1d03b85ec868cadf2fa2d
| Commit: | a3254fa | |
|---|---|---|
| Author: | Yerken Tussupbekov | |
| Committer: | Facebook GitHub Bot | |
Add bundle_id to InstallRequest Reviewed By: fgasperij Differential Revision: D32098488 fbshipit-source-id: b21accb16ae2cc75684822bb303ee00fa8a404c3
| Commit: | 560a67f | |
|---|---|---|
| Author: | Juan Chaparro | |
| Committer: | Facebook GitHub Bot | |
Add simulate memory warning command Reviewed By: jbardini Differential Revision: D32203544 fbshipit-source-id: 3b7d90fa929b4e469ac148aa881d2fc3c08d067e
| Commit: | 8f0914b | |
|---|---|---|
| Author: | Ruijie Chen | |
| Committer: | Facebook GitHub Bot | |
Implement dap command in idb companion Summary: Implement dap command to spawn a dap protocol server for remote debugging. Reviewed By: jbardini Differential Revision: D31856353 fbshipit-source-id: 7e1931e7761b50e23cdc6b6faf0df372ebb7cbfa
| Commit: | c99d071 | |
|---|---|---|
| Author: | Callum Ryan | |
| Committer: | Facebook GitHub Bot | |
Send notification command Reviewed By: jbardini Differential Revision: D32019332 fbshipit-source-id: f597bedbbe1ce55fc69785345795171e9a5292a1
| Commit: | e3ba6f1 | |
|---|---|---|
| Author: | Yerken Tussupbekov | |
| Committer: | Facebook GitHub Bot | |
Add and populate DebuggerInfo in LaunchResponse Summary: This is required for implementing debugging for apps, where we launch a suspended app and use return process id to attach via lldb A follow-up is processing DebuggerInfo to be printed as a JSON struct via idb cli Reviewed By: jbardini Differential Revision: D32054698 fbshipit-source-id: a559f06f9b7432c5d4c397d6215b3eaafbe773cb
| Commit: | e5cb063 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Make app debuggability optional on install, off by default Summary: Right now we "persist" apps, even if we don't wish to debug them. This is hideously suboptimal and a waste of storage space in the general case. So I'm making this have to be flagged on the install, the default is off. Reviewed By: jbardini Differential Revision: D31685386 fbshipit-source-id: e00bfe259146898e0739c7e757bcf63d05cace79
| Commit: | 7c3fb9d | |
|---|---|---|
| Author: | Andres Suarez | |
| Committer: | Facebook GitHub Bot | |
Enable CLANGFORMAT Differential Revision: D31464478 fbshipit-source-id: 7bd403f6faef8eec8565621c6814032afe0f897f
| Commit: | c598e69 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Add Application Container Support for Simulators Summary: The way that group containers are implemented has a number of advantages that I want to use in Application containers also. This approach will eventually replace the usage of `--bundle-id` in file commands: - The root of the application container-of-containers allows discovery of all application containers that can be interacted with. - We can use this as a way of getting rid of the `:` syntax for `--bundle-id` that's inconsistent with every other container - It allows for copying across containers, without pulling then pushing. Reviewed By: fgasperij Differential Revision: D30535532 fbshipit-source-id: 4c7a34077cbbf63dbff751085d8a448fc77326cb
| Commit: | dc72b3d | |
|---|---|---|
| Author: | Johnny Souza | |
| Committer: | Facebook GitHub Bot | |
Add code coverage format to GRPC definition Summary: API changes to specify code coverage data format idb_companion should return. Reviewed By: lawrencelomax Differential Revision: D30961625 fbshipit-source-id: 557abafcfe3cfc5538b3c699e04cfc1493743787
| Commit: | 5385c72 | |
|---|---|---|
| Author: | Yerken Tussupbekov | |
| Committer: | Facebook GitHub Bot | |
idb.proto: add Setting.ANY and allow to pass preference name,domain Summary: This diff introduced necessary parameters into Get and Set requests for supporting random name,value preferences Reviewed By: lawrencelomax Differential Revision: D30768086 fbshipit-source-id: b0a16e99834af3470075c5175da84e52a872b096
| Commit: | d4cbc74 | |
|---|---|---|
| Author: | Lawrence Lomax | |
| Committer: | Facebook GitHub Bot | |
Add -[FBFileCommands fileCommandsForGroupContainers] Summary: Adds the necessary definitions and wiring into a new file container type. Reviewed By: jbardini Differential Revision: D30219099 fbshipit-source-id: d2775abb7e859ea0a3469e26f1a6fa7f0292d585