CLI
Create a session and always arrange to release it:ios with android
to use the same lifecycle on Android:
recording list <session-id> to inspect up to 100 retained recordings for
a session. recording status includes lifecycle events and any actionable
failure. recording get is an alias for recording status.
Retry safely
Pass a stable--idempotency-key when starting a recording. Repeating start
with the same session and key returns the original recording instead of
starting another capture. The key may contain 1 to 200 printable characters.
Stopping a recording is also safe to repeat. A recording that is already
ready returns its current metadata. If finalization reports a retryable
failure, inspect failure.action and failure.nextAttemptAt, then poll
recording status; retained finalization may complete after the original stop
request.
Releasing a session attempts to finalize its active recording before returning
the simulator to the fleet. You can continue to inspect and download a ready
recording with the released session id. A recording is retained for seven days
from creation; retentionExpiresAt is the exact deadline.
TypeScript SDK
Install@run-cloud/sdk and use the same methods on cloud.ios or
cloud.android:
cloud.simulators exposes the same methods with platform: "ios" | "android"
in the options object.
Lifecycle and failures
SimulatorRecording.status is one of:
Ready metadata includes
contentType, byteSize, checksum, etag,
durationMs, readyAt, retentionExpiresAt, and an authenticated API-relative
downloadUrl. Failures include stage, code, message, action,
retryable, and nextAttemptAt.