Reputation: 1513
I was trying to capture video for app Preview from ios simulator with implementing command in terminal.
but when i try to use the command bellow
xcrun simctl io booted recordVideo appPreview.mp4
the terminal gives me the error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Selected interface does not support video recording.
Invalid argument
can someone explain what is the problem here and how to resolve this problem?
I am using XCODE Version 11.0 beta 5 (11M382q)
and running ios simulator Xs Max
Upvotes: 12
Views: 3182
Reputation: 214
In my case it was actually that i'd passed an invalid output filename eg.
xcrun simctl io booted recordVideo invalid-folder/appPreview.mp4
where invalid-folder
didn't exist. The resultant output was:
Couldn't create an asset writer for writing video frames: allocationErrorError starting video recorder: simctl.SimulatorError.allocationError.
An error was encountered processing the command (domain=simctl.SimulatorError, code=2):
We could not allocate necessary AV objects to perform the recording.
Upvotes: 0
Reputation: 17229
This is fixed in Xcode 11.2; installing that version of Xcode will upgrade your CoreSimulator which also fixes Xcode 11.0 and 11.1.
Upvotes: 3
Reputation: 2329
As stated by chumps52, this is a known issue. You can however use Xcode 11 to record video of the iOS 12 Simulators (and below). So unless you have specific iOS 13 things to show in your video, use for example a 12.2 simulator to record.
Upvotes: 0
Reputation: 286
It is a known issue. "Video recording of the iOS 13, tvOS 13, and watchOS 6 simulator through xcrun simctl io <UDID> recordVideo returns an error instead of recording video. (50625716)"
Unrelated, but the Xcode 11 GM is out - beta 5 is outdated.
Upvotes: 8