The command "simctl recordVideo" does not validate the output path before recording

Number:rdar://38274395 Date Originated:08-Mar-2018 10:36 PM
Status:Open Resolved:
Product:Developer Tools Product Version:9.2
Classification:UI/Usability Reproducible:Always
When using simctl to record a video of an open iOS simulator, the “path” parameter is only validated at the end of the recording, not at the beginning, so in case the path is invalid or is a directory, the user is wasting time recording something that won’t be saved.

Steps to Reproduce:
1. Open a terminal emulator and open iOS Simulator.
2. Inside the terminal emulator, run “xcrun simctl io booted recordVideo ~/Desktop/“ (without the quotes).

Expected Results:
The recording does not start and a “path is a directory” error is output. Better yet, a default file could be created automatically.

Actual Results:
You get output like this:

GVA encoder info: recomputed for fps: 8.514949, gop size in pics: 255, gop size in sec: 30.000000
Recording... (Press CTRL+C to stop)

After using iOS simulator and pressing Ctrl+C in Terminal, the following error is shown:

Error: Error Domain=NSPOSIXErrorDomain Code=21 "Is a directory".




Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!