好的,我们现在可以在 App Store 上提交您的应用程序的视频预览。根据 Apple 的说法,我们应该使用 iOS 8 设备来实现这一点,并且OSX 10.10.
问题是您必须拥有所有不同的设备(4 英寸、4.7 英寸、5.5 英寸和 iPad)。
有替代方案吗?
我正在考虑捕捉模拟器的视频。问题是设备屏幕比我的大FullHD
以 100% 分辨率显示时进行监控。有什么解决方案可以直接从模拟器中以全分辨率捕获视频吗?
编辑:
既然很多人都在回答我的问题,我就不问了,我说:
- 记录一种设备的大小并缩放它不是我所要求的;
- 如何录音any应用程序预览不是我要的;
- 我要问的不是你如何进行预览;
What I am要求是如果屏幕不适合,您能以 100% 分辨率从模拟器录制视频吗?
对于 Xcode 8.2 或更高版本
您可以使用模拟器拍摄视频和屏幕截图xcrun simctl
,一个用于控制模拟器的命令行实用程序
-
在模拟器上运行您的应用程序
-
打开终端
-
运行命令
-
截屏
xcrun simctl io booted screenshot <filename>.<file extension>
例如:
xcrun simctl io booted screenshot myScreenshot.png
-
拍摄视频
xcrun simctl io booted recordVideo <filename>.<file extension>
例如:
xcrun simctl io booted recordVideo appVideo.mov
-
Press ctrl + C to stop recording the video.
创建的文件的默认位置是当前目录。
Xcode 11.2 及更高版本提供了额外的选项。
来自 Xcode 11.2 Beta 发行说明
simctl 视频录制现在可生成更小的视频文件,支持 HEIC
压缩,并利用硬件编码支持,其中
可用的。此外,还可以在 iOS 13、tvOS 上录制视频
13、watchOS 6 设备已恢复。
您可以使用其他标志:
xcrun simctl io --help
Set up a device IO operation.
Usage: simctl io <device> <operation> <arguments>
...
recordVideo [--codec=<codec>] [--display=<display>] [--mask=<policy>] [--force] <file or url>
Records the display to a QuickTime movie at the specified file or url.
--codec Specifies the codec type: "h264" or "hevc". Default is "hevc".
--display iOS: supports "internal" or "external". Default is "internal".
tvOS: supports only "external"
watchOS: supports only "internal"
--mask For non-rectangular displays, handle the mask by policy:
ignored: The mask is ignored and the unmasked framebuffer is saved.
alpha: Not supported, but retained for compatibility; the mask is rendered black.
black: The mask is rendered black.
--force Force the output file to be written to, even if the file already exists.
screenshot [--type=<type>] [--display=<display>] [--mask=<policy>] <file or url>
Saves a screenshot as a PNG to the specified file or url(use "-" for stdout).
--type Can be "png", "tiff", "bmp", "gif", "jpeg". Default is png.
--display iOS: supports "internal" or "external". Default is "internal".
tvOS: supports only "external"
watchOS: supports only "internal"
You may also specify a port by UUID
--mask For non-rectangular displays, handle the mask by policy:
ignored: The mask is ignored and the unmasked framebuffer is saved.
alpha: The mask is used as premultiplied alpha.
black: The mask is rendered black.
现在您可以在jpeg
,带有掩模(用于非矩形显示器)和一些其他标志:
xcrun simctl io booted screenshot --type=jpeg --mask=black screenshot.jpeg
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)