Skip to content

device_record

Cross-platform screen recording for proof captures. Wraps xcrun simctl io recordVideo (iOS) and adb shell screenrecord (Android), auto-pulls Android files to the host, converts to MP4 with faststart via ffmpeg. Three actions: action=“start” begins a background recording (returns pid + output path); action=“stop” finalizes ALL active recordings (returns saved files; pass gif=true to also produce GIFs via ffmpeg); action=“status” lists active recordings. Android caps at 180s per recording. iOS may stall on long captures via xcrun simctl. Session-less.

NameTypeRequiredDefaultConstraintsDescription
action`enum: startstopstatus`Yes
platform`enum: iosandroid`No
outputPathstringNo(start only) Absolute output path. Defaults to /tmp/rn-dev-agent-proof-<platform>-<timestamp>.mp4.
gifbooleanNo(stop only) When true, also convert each saved recording to GIF via ffmpeg.
gifPathstringNo(stop only) Override GIF output path. Defaults to the recording path with .gif extension.
device_record(action: <enum: start | stop | status>)