Skip to content

Instantly share code, notes, and snippets.

@fichek
Last active March 3, 2021 00:09
Show Gist options
  • Save fichek/3be6ead9502049129115792c7e71688d to your computer and use it in GitHub Desktop.
Save fichek/3be6ead9502049129115792c7e71688d to your computer and use it in GitHub Desktop.
iPhone X Simulator Screenshots

Now that you can finally™ submit iPhone X screenshots of your apps to iTunes Connect, here's an easy Terminal command to take a proper screenshot:

xcrun simctl io booted screenshot "~/Desktop/Simulator Screen Shot - iPhone X - $(date +'%Y-%m-%d at %H.%M.%S').png"

This will use Xcode's built-in Simulator command line utility to save a full-frame screenshot of the iPhone X simulator (assuming it's the only one running), without cutting of the notch and rounded corners like cmd+s does. Name is formatted the same as cmd+s would do it and it's also saved to desktop.

Important thing to note: if Debug -> Optimize Rendering for Window Scale is on, screenshot might be saved at wrong resolution, so either turn that off or make sure it's at 100% scale before taking the screenshot (not "Actual Size", but 100%).

@fichek
Copy link
Author

fichek commented Oct 28, 2017

Turns out Simulator was fixed in Xcode 9.0.1 so it no longer cuts off notch and corners, so just update Xcode instead :)

@tegranjeet
Copy link

Do you know if there is a way to keep the rounded corners and notch? It would be much easier to paste these screenshots onto a template image of the iPhone X. This makes it easier to create wide, panoramic like screenshot experiences by pasting images of the device onto a large background before chopping it up into individual shots.

@seatechdev
Copy link

I am also looking for a way to keep the notch. The only way i was able to figure out was using the mac osx screenshot of the simulator. But that also takes he picture of the device and iPhone X label below.

@pplante
Copy link

pplante commented Sep 4, 2018

This is kinda old but I found this option keeps the iPhone X notch as an alpha channel (or use --mask=black):

xcrun simctl io booted screenshot --mask=alpha test.png

@SamuelFolledo
Copy link

None of these command lines includes the simulator. This is basically the same as CMD + S

@fichek
Copy link
Author

fichek commented Mar 2, 2021

None of these command lines includes the simulator. This is basically the same as CMD + S

Yes, at the time of posting, this was the only way to get proper screenshots. It's kind slightly outdated now...

@SamuelFolledo
Copy link

I found the answer.
CMD + Shift + 4 + Space and select the simulator as the window to screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment