是否有可能通过 MacOS 终端命令从物理 iPhone 捕获屏幕截图和截屏视频?
我试过命令 xcrun io booted screenshot test.png
,但答案是 No devices are booted
。
正如我正确理解的那样,它仅适用于模拟设备。
在 Android 设备上,您可以简单地编写一堆 adb 命令,例如:
adb shell screenrecord /sdcard/screencast.mp4
adb pull /sdcard/screencast.mp4 *location on Mac*
adb shell rm /sdcard/screencast.mp4
如果能在 iOS 上拥有相同的功能就好了。