To list the devices you can do the following, xcrun simctl list. Īs the name suggests this is the device that we want to use when we run an operation. That might look a bit confusing, so I will go through each one of the inputs/arguments. How can we use this to take a screenshot? TL DR: We can use the following to take a screenshot of the currently running simulator - xcrun simctl io booted screenshot ~/Desktop/screenshot.pngĪll we need is the following command: xcrun simctl io Taking a screenshot from the terminal is surprisingly easy, all we need to do is use xcrun. The second way is to use the button that you can find above the simulator: Screenshot iOS simulator with the terminal(xcrun) The first and fastest way is to use the following shortcut, command + s. There are two ways that one can screenshot the iOS simulator without the command line. Screenshot iOS simulator without command line
#Run apple emulator mac cmd lin how to#
In this tutorial I will show you how you can take a screenshot with or without the command line, as well as showing how to record a video of the simulator using the command line.
Taking a screenshot or recording a video of the iOS simulator can sometimes be useful, whether it is for the App Store or maybe for some internal use case that the company or your team has.