[build-tools] Add iOS Simulator recorder#3950
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3950 +/- ##
=======================================
Coverage 59.28% 59.28%
=======================================
Files 935 935
Lines 41093 41093
Branches 8660 8660
=======================================
Hits 24356 24356
Misses 16643 16643
Partials 94 94 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new Swift-based record-sim helper under @expo/build-tools to record iOS Simulator screen output (either segmented fMP4 + manifest metadata for HLS/CMAF-style workflows, or a single MP4 when segmentation is disabled), and updates worker packaging to build and include the executable in iOS worker archives.
Changes:
- Introduces a Swift Package (
packages/build-tools/resources/record-sim) implementing a simulator framebuffer-based recorder plus a small CLI. - Adds a local build script (
yarn workspace @expo/build-tools build:record-sim) that builds the Swift executable intopackages/build-tools/bin/record-sim. - Updates iOS worker packaging to build
record-simfrom source during packaging and include only the executable in the iOS worker tarball; ignores the locally generated binary in git.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/worker/package.sh | Builds record-sim during iOS worker packaging and copies the executable into the worker archive. |
| packages/build-tools/package.json | Adds build:record-sim script to build/copy the Swift executable into bin/. |
| packages/build-tools/.gitignore | Ignores the generated bin/record-sim binary. |
| packages/build-tools/resources/record-sim/Package.swift | Defines the Swift package (library + executable) and required frameworks. |
| packages/build-tools/resources/record-sim/README.md | Documents output format and CLI/library usage. |
| packages/build-tools/resources/record-sim/.gitignore | Ignores local SwiftPM/Xcode build outputs. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/SimulatorRecorder.swift | Implements the recording pipeline using private simulator framebuffer callbacks + AVAssetWriter. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/RecordingOutputWriter.swift | Handles segmented output emission and writes session.json manifest. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/FramebufferDisplaySource.swift | Interfaces with private simulator services to obtain IOSurface snapshots and callbacks. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/PrivateSimulatorServices.swift | Loads private frameworks and locates simulator devices/state. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/RecordingModels.swift | Defines configuration and manifest/segment model types. |
| packages/build-tools/resources/record-sim/Sources/RecordSim/Utilities.swift | Shared helpers (time conversion, JSON encoding, monotonic clock). |
| packages/build-tools/resources/record-sim/Sources/record-sim/main.swift | CLI argument parsing and orchestration of the recorder lifecycle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
Why
Add a small Swift helper for recording iOS Simulator screen output from EAS build workers. The helper produces either segmented fMP4 output with manifest metadata for playlist construction or one continuous MP4 when segmentation is disabled.
How
record-simSwift package under@expo/build-toolsresources.yarn workspace @expo/build-tools build:record-simfor local builds intopackages/build-tools/bin/record-sim.record-simfrom source and copy only the executable into the worker archive.bin/record-simbinary.Test Plan
yarn workspace @expo/build-tools build:record-simpackages/build-tools/bin/record-sim --helpbash -n packages/worker/package.shyarn workspace @expo/build-tools typecheck./node_modules/.bin/oxfmt --check packages/build-tools/.gitignore packages/build-tools/package.json packages/worker/package.sh packages/build-tools/src/index.ts