All Articles

Capture screenshot or record video on the iOS Simulator using Terminal

Previously I’ve used Quicktime to capture images and video of the iOS simulator. That’s a perfectly fine way to go, but here’s another way using Terminal.


Capture a screenshot or take a photo of the iOS simulator

Usage:

xcrun simctl io booted screenshot myImageScreenshot.png

Steps:

  1. Launch app in the Simulator
  2. Open Terminal and enter the above command.

The current directory will contain your saved screenshot.


Record a video of the iOS simulator

Usage:

xcrun simctl io booted recordVideo myNewVideo.mov

Steps:

  1. Launch app in the Simulator
  2. Open Terminal and enter the above command, this will start the video recording.
  3. When you are done recording, hit CTRL & C.

The current directory will contain your saved video.