使用'xcrun simct'的iOS模拟器视频录制出现错误 [英] iOS Simulator video recording with 'xcrun simct' give error
问题描述
在检查 Xcode 8.2更改时我发现现在我们可以使用Terminal录制模拟器了.
While checking Xcode 8.2 changes I found that now we can record simulator using Terminal.
因此,我试图按照此Apple文档中的说明从iOS模拟器录制视频.
So I am trying to record video from iOS simulator as describe in this Apple Document.
命令:
xcrun simctl io启动了recordVideo demoVideo.mp4
xcrun simctl io booted recordVideo demoVideo.mp4
错误:
2016-12-20 15:44:27.206 simctl[6434:984477] *** Assertion failure in +[SimDisplayVideoWriter videoWriter], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-338.16/SimulatorKit/SimDisplayVideoWriter.m:48
2016-12-20 15:44:27.207 simctl[6434:984477] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to create metal device for video writer.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffa07f90db __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffb548ba2a objc_exception_throw + 48
2 CoreFoundation 0x00007fffa07fdc32 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fffa2266d50 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 SimulatorKit 0x000000010a248c53 +[SimDisplayVideoWriter videoWriter] + 1015
5 SimulatorKit 0x000000010a2499e5 +[SimDisplayVideoWriter videoWriterForURL:fileType:] + 316
6 simctl 0x000000010a168a00 simctl + 31232
7 simctl 0x000000010a166bee simctl + 23534
8 simctl 0x000000010a170d52 simctl + 64850
9 libdispatch.dylib 0x00007fffb5d3fef7 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x00007fffb5d370b8 _dispatch_client_callout + 8
11 libdispatch.dylib 0x00007fffb5d39029 _dispatch_root_queue_drain + 917
12 libdispatch.dylib 0x00007fffb5d38c47 _dispatch_worker_thread3 + 99
13 libsystem_pthread.dylib 0x00007fffb5f84712 _pthread_wqthread + 1299
14 libsystem_pthread.dylib 0x00007fffb5f841ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
iOS模拟器和应用程序均可正常运行.此错误仅在终端中显示.
iOS simulator and application both working properly. This error only shown in Terminal.
我正在使用Xcode 8.2.在带有iOS 10.2的iPhone 7、7 Plus,SE模拟器中进行了尝试.
I am using Xcode 8.2. Tried in Simulator of iPhone 7, 7 Plus, SE with iOS 10.2.
我是否缺少任何详细信息或需要安装组件?
Am I missing any detail or need to install and component?
推荐答案
仅在支持Metal的Mac上支持视频录制.如果您的系统不支持金属,您将看到一条中止该消息的消息.是的,我们应该使该错误消息更加用户友好.
Video recording is only supported on Macs that support Metal. If your system doesn't support metal, you will see an abort with that message. Yeah, we should make that error message more user friendly.
要查看支持的系统列表,可以查看 https://support.apple .com/en-us/HT205073
To see a list of supported systems, you can check out https://support.apple.com/en-us/HT205073
这篇关于使用'xcrun simct'的iOS模拟器视频录制出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!