Take screenshots in the iOS simulator

前端 未结 17 1524
不知归路
不知归路 2020-12-12 08:33

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?

相关标签:
17条回答
  • 2020-12-12 09:13

    For people using Xcode 11.4, to get rid of the simulator top bar, this is far from ideal but you can disable shadows for the screenshot application in a terminal with the following command :

    $ defaults write com.apple.screencapture disable-shadow -bool TRUE; killall SystemUIServer
    

    Then, you can use + + 4 and select the simulator to take a screenshot. Without the shadow, you can easily crop the top bar with the preview app. To re-enable the shadow for the screenshot application :

    $ defaults write com.apple.screencapture disable-shadow -bool FALSE; killall SystemUIServer
    

    Source of this answer here.

    0 讨论(0)
  • 2020-12-12 09:16

    In OSX Captain its a bug to take screenshot of simulator. You have to Update your OSX Sierra first then your are able to take. while taking in OSX Captain use terminal command which is xcrun simctl io booted screenshot.

    before running this command u have to select desktop in terminal like:

    "cd desktop" then run that command. Happy Coding!!!

    0 讨论(0)
  • 2020-12-12 09:18

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

    0 讨论(0)
  • 2020-12-12 09:19

    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.

    0 讨论(0)
  • 2020-12-12 09:19

    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..

    0 讨论(0)
  • 2020-12-12 09:19

    First method:

    Select simulator and press "command + s" button. Screenshot saved on desktop.

    Second method:

    Select simulator and go to "File > New Screenshot". Screenshot saved on desktop.

    0 讨论(0)
提交回复
热议问题