xcrun simctl io booted screenshot -type =jpeg -mask =black myScreenshot. The following example will take a jpeg screenshot with a mask (see round corners and a notch). You can specify the following options to the command. If you don't know where is the current directory, type pwd in Terminal.app and press ⏎ Return.Įxample xcrun simctl io booted screenshot myScreenshot.png Options The screenshot will be saved to your current directory.
Xcrun is a tool Apple provided to run any tool inside Xcode from the command line.
The screenshot will be saved to your Desktop. Take a screenshot An easy wayįor taking a screenshot, I usually launch an app in the Simulator and press ⌘ - command + s or File > New Screen Shot. Sponsor and reach thousands of iOS developers.