Take screenshots in the iOS simulator

279,143

Solution 1

It's just as simple as command+s or File > Save Screen Shot in iOS Simulator. It will appear on your desktop by default.

Solution 2

An update with Xcode 11.4 simulator

To capture a screen shot, click on 'Camera' icon/action button, on the top bar of simulator.

enter image description here

OR

Select Save Screen Shot menu item, from File menu.

File => Save Screen Shot


Use ⌘ + S to capture a screen shot.
(Use window + s, if you are using windows/non-apple keyboard).

enter image description here

See for more details: How to change simulator scale options with Xcode 9+.


Tip 1: How do you get screen shot with 100% (a scale with actual device size) that can be uploaded on AppStore?

Disable Optimize Rendering for Window scale from Debug menu, before you take a screen shot.

Here is an option

Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale"

enter image description here


Tip 2: Where is screen shot saved (Default Path)? How to change default path?

Simulator saves screen shot file on (logged-in user's) desktop and it's default path.

To change default path (with Xcode 9+), press and hold ⌥ Option (alt) button from keyboard, while you take a screen shot.
Or
Using Mac Keyboad: Press keys ⌥ Option + + s all together.
It will show to a dialog with file storage options and also allows to set/change default path.

enter image description here


Tip 3: How to take a screen shot with Device Bezel?

Enable Show Device Bezel from Window menu.

Here is an option

Menubar ▶ Window ▶ Enable "Show Device Bezel"

enter image description here

Now,

  1. Press + shift + 4 + Spacebar, all together in Mac Keyboard. (A window snap capture mode will become active)
  2. Select Simulator window/frame, that you want to capture. It will save screenshot with device bezel (with shadow effect in background) on (logged-in user's) desktop.

You can also remove the Simulator toolbar as described here.

Solution 3

on iOS Simulator,

Press Command + control + c or from menu : Edit>Copy Screen

open "Preview" app, Press Command + n or from menu : File> New from clipboard , then you can save command+s

For Retina, activate iOS Simulator then on menu:HardWare>Device>iPhone (Retina) and follow above process

Command + S

is the way to save on Desktop, (on new iPhone simulators, this was introduced in later simulator)

Solution 4

You can google for IOS Simulator Cropper software useful for capturing screen shots and also easy to use with various options of taking snapshots like with simulator/without simulator.

Update Just pressing CMD + S will give you screenshot saved on desktop. Pretty easy huh..

Solution 5

Since Xcode 8.2, you can also save a screenshot with the following command:

xcrun simctl io booted screenshot

Further information in this blog: https://medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0

Share:
279,143
Shreyash Mahajan
Author by

Shreyash Mahajan

About Me https://about.me/sbm_mahajan Email [email protected] [email protected] Mobile +919825056129 Skype sbm_mahajan

Updated on December 09, 2021

Comments

  • Shreyash Mahajan
    Shreyash Mahajan over 2 years

    I want to take a screenshot of my iOS application when it is running in the simulator, and save the screenshot on my Mac. How can I do this?

  • Devang
    Devang almost 13 years
    Oh my mistake this will be possible only if you are running MAC using VMWare
  • Shreyash Mahajan
    Shreyash Mahajan almost 13 years
    Thanks Devang. May i will try it for VMWare.
  • jameshfisher
    jameshfisher about 9 years
    How do I get it to prompt me for the location to save to?
  • Wojciech Rutkowski
    Wojciech Rutkowski about 9 years
    There is no ready-to-use solution as per stackoverflow.com/q/23661097/1659311
  • tounaobun
    tounaobun almost 9 years
    UIApplicationUserDidTakeScreenshotNotification did not fire.
  • Pang
    Pang about 7 years
    This is more or less just a repeat of the existing answers.
  • russbishop
    russbishop over 6 years
    In Xcode 9 you can hold down Option and you will be prompted for a location to save the screenshot.
  • russbishop
    russbishop over 6 years
    The crash was a framework bug that we worked around in Xcode 8.3.3. It does not apply to Xcode 9 or later.
  • Krunal
    Krunal over 6 years
    @jameshfisher - This may help you to get prompt for location to save - stackoverflow.com/a/48150656/5638630
  • Jack Vial
    Jack Vial about 6 years
    Heads up, it won't prompt you to save so check your desktop after hitting save.
  • Fogmeister
    Fogmeister almost 6 years
    What have you added to this question that was worth resurrecting a years old question?
  • ScottyBlades
    ScottyBlades over 5 years
    Its not coming on my desktop :(
  • rorypicko
    rorypicko over 5 years
    @Pang no this one is way more condescending, to get the point across of course.
  • Manoj Shrestha
    Manoj Shrestha about 5 years
    Also, hold ⌘ when you click on the simulator to skip the device name on the bottom in the screenshot.
  • Krunal
    Krunal about 5 years
    @ManojShrestha You are welcomed to edit this answer by adding your suggestion.
  • Xonshiz
    Xonshiz about 5 years
    Why is this NOT accepted answer. Thanks a ton Krunal for this compilation!
  • Wojciech Rutkowski
    Wojciech Rutkowski almost 5 years
    @AshimDahal it's still is on Xcode 10.2.1 - I've just checked. Make sure you have Simulator active, not Xcode itself.
  • Ashim Dahal
    Ashim Dahal almost 5 years
    @WojciechRutkowski for some reason none of my shortcuts was not working ..... I had to toggle switch in Simulator --> Hardware--> Keyboard --> Send Keyboard Shortcuts to Device. This fixed all my shortcut functionality to work normally
  • Dale
    Dale almost 5 years
    If the screen shot is to be used on the app store, it can't have alpha, and the default is to have alpha 'on'. So that means bringing the image up in the preview and exporting without alpha. That a PITA. Thanks Apple.
  • Dru
    Dru over 4 years
    Check ~/Downloads if your screenshots are not in ~/Desktop
  • Teofilo Israel Vizcaino Rodrig
    Teofilo Israel Vizcaino Rodrig over 4 years
    I liked this answer.
  • Admin
    Admin about 4 years
    it doesn't work anymore after latest (11.4) Xcode update
  • Admin
    Admin about 4 years
    it takes screenshots without device frame
  • Phuah Yee Keat
    Phuah Yee Keat about 4 years
    seems like the "command" key to remove the device name at the bottom doesn't work anymore, bummer. Need to manually crop the top out.
  • Krunal
    Krunal about 4 years
    @GenchiGenbutsu - Thank you for the update. You are welcomed to edit this answer and improve its quality. (I'll check and update, if I'll get a chance)
  • jon
    jon over 3 years
    This is exactly what I want, but when I take the snapshot, it also captures the bar that is above the iPhone with the close/minimize/full screen buttons, as well as the capture, home, and rotate buttons. How do I capture just the phone without this bar?
  • K.Amanov
    K.Amanov about 3 years
    Also, hold the Alt key while clicking on the simulator for taking screenshots without shadows.