Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🐛 Bug fixes

- [build-tools] Limit iOS Simulator screen recordings to 5 Mbps to keep long device run session artifacts uploadable. ([#4325](https://github.com/expo/eas-cli/pull/4325) by [@szdziedzic](https://github.com/szdziedzic))

### 🧹 Chores

## [23.2.0](https://github.com/expo/eas-cli/releases/tag/v23.2.0) - 2026-08-31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const RECORD_SIM_FINISH_TIMEOUT_MS = 70_000;
const RECORD_SIM_FORCE_STOP_TIMEOUT_MS = 5_000;
const RECORD_SIM_MAX_ATTEMPTS_PER_BOOT = 3;
const RECORD_SIM_COMMAND = 'record-sim';
// A two-hour recording at this target is about 4.5 GB, leaving room below R2's
// single-part upload limit for MP4 container overhead.
Comment on lines +19 to +20

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels very handwavy cause if the screen does not change, a two hour recording should be under 10 MB

const RECORD_SIM_BITRATE = '5000000';

type IosSimulatorRecording = {
id: string;
Expand Down Expand Up @@ -241,7 +244,7 @@ async function startIosSimulatorRecordingAsync(
session.logger.info(`Starting screen recording for ${deviceName}.`);
const recordingSpawn = spawn(
session.recordSimCommand,
['--udid', udid, '--output', outputDirectory, '--segment-duration', '0'],
createRecordSimArgs({ udid, outputDirectory }),
{
env: session.env,
stdio: ['ignore', 'pipe', 'pipe'],
Expand Down Expand Up @@ -285,6 +288,25 @@ async function startIosSimulatorRecordingAsync(
});
}

export function createRecordSimArgs({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think extracting to a separate function makes sense

udid,
outputDirectory,
}: {
udid: IosSimulatorUuid;
outputDirectory: string;
}): string[] {
return [
'--udid',
udid,
'--output',
outputDirectory,
'--segment-duration',
'0',
'--bitrate',
RECORD_SIM_BITRATE,
];
}

async function resolveRecordSimCommandAsync({ env }: { env: Env }): Promise<string | null> {
try {
await spawn('which', [RECORD_SIM_COMMAND], { env });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { type IosSimulatorUuid } from '../../../utils/IosSimulatorUtils';
import { createRecordSimArgs } from '../IosSimulatorRecordingUtils';

describe(createRecordSimArgs, () => {
it('limits single-file recordings to 5 Mbps', () => {
expect(
createRecordSimArgs({
udid: '00000000-0000-0000-0000-000000000000' as IosSimulatorUuid,
outputDirectory: '/tmp/recording',
})
).toEqual([
'--udid',
'00000000-0000-0000-0000-000000000000',
'--output',
'/tmp/recording',
'--segment-duration',
'0',
'--bitrate',
'5000000',
]);
});
});
Loading