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?
我想在我的iOS应用程序在模拟器中运行时,给它拍一个截图,然后保存在我的Mac上,我该怎么做呢?
14 个解决方案
#1
620
It's just as simple as command+s or File
> Save Screen Shot
in iOS Simulator. It will appear on your desktop by default.
它和命令+s或文件>在iOS模拟器中保存屏幕截图一样简单。默认情况下,它会出现在您的桌面上。
#2
34
on iOS Simulator,
在iOS模拟器,
Press Command + control + c
or from menu : Edit>Copy Screen
按命令+控制+ c或从菜单:编辑>复制屏幕
open "Preview" app, Press Command + n
or from menu : File> New from clipboard , then you can save command+s
打开“预览”应用,按命令+ n或从菜单:文件>新从剪贴板,然后您可以保存命令+s
For Retina, activate iOS Simulator then on menu:
HardWare>Device>iPhone (Retina)
and follow above process对于视网膜,激活iOS模拟器,然后在菜单上:硬件>设备>iPhone (Retina)并遵循以上过程
Command + S
is the way to save on Desktop, (on new iPhone simulators, this was introduced in later simulator)
是在桌面上保存的方法(在新的iPhone模拟器上,这是在后来的模拟器中引入的)
#3
14
Use ⌘ + S to capture a screen shot.
(Use window + s, if you are using windows/non-apple keyboard).
使用⌘+ S来捕获一个屏幕截图。(如果你使用的是windows/非苹果键盘,请使用windows + s)。
See for more details: How to change simulator scale options with Xcode 9+.
查看更多细节:如何使用Xcode 9+更改模拟器比例选项。
Tip 1: How do you get screen shot with 100% (a scale with actual device size) that can be uploaded on AppStore?
提示1:如何在AppStore上上传100%的屏幕截图(一个实际设备大小的比例)?
Disable Optimize Rendering for Window scale
from Debug
menu, before you take a screen shot.
在进行屏幕快照之前,从Debug菜单中禁用窗口缩放的优化渲染。
Here is an option
这是一个选择
Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale"
菜单条▶▶禁用调试“窗口规模优化渲染”
Tip 2: Where is screen shot saved (Default Path)? How to change default path?
提示2:屏幕截图保存在哪里(默认路径)?如何更改默认路径?
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.
更改默认路径与Xcode 9 +(),按住⌥从键盘选项(alt)按钮,当你屏幕截图。或者使用Mac Keyboad:按钥匙⌥选项+⌘+ s。它将显示给带有文件存储选项的对话框,并允许设置/更改默认路径。
Tip 3: How to take a screen shot with Device Bezel?
技巧3:如何使用设备面板拍摄屏幕截图?
Enable Show Device Bezel
from Window
menu.
从窗口菜单中启用显示设备边框。
Here is an option
这是一个选择
Menubar ▶ Window ▶ Enable "Show Device Bezel"
窗口菜单条▶▶启用“显示设备边框”
Now,
现在,
- Press ⌘ + shift + 4 + Spacebar, all together in Mac Keyboard. (A window snap capture mode will become active)
- 按⌘+ shift + 4 +空格键,所有在Mac键盘。(窗口抓拍模式将变为活动模式)
- 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. - 选择你想要捕获的模拟器窗口/框架。它将在(登录用户的)桌面上保存带有设备边框的屏幕截图(在后台有阴影效果)。
#4
13
Press Command+Shift+4
and then keep the mouse pointer on Simulator and then press "Space Bar"
key one camera icon will appear, now left click
the mouse. Your simulator screen shot is saved on desktop. You can take the screen shot any small screen in the same way.
按下命令+Shift+4,然后将鼠标指针放在模拟器上,然后按下“空格键”键将出现一个摄像头图标,现在鼠标左键点击鼠标。你的模拟屏幕截图保存在桌面上。你可以用同样的方法拍摄任何一个小屏幕。
#5
13
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.
您可以谷歌用于IOS模拟器Cropper软件,这款软件对捕捉屏幕快照很有用,也可以很容易地与各种拍照选项一起使用,比如带模拟器/不带模拟器的快照。
Update Just pressing CMD + S will give you screenshot saved on desktop. Pretty easy huh..
更新只需按下CMD + S就会给你在桌面上保存的截图。很简单啊. .
#6
11
Since Xcode 8.2, you can also save a screenshot with the following command:
由于Xcode 8.2,您还可以通过以下命令保存屏幕截图:
xcrun simctl io booted screenshot
xcrun simctl io启动截图
Further information in this blog: https://medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0
本博客的进一步信息:https://medium.com/@hollanderbart/new- featuresin xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0
#7
10
- Focus simulator
- 专注模拟器
-
Go to menu File->Save Screen Shot
进入菜单文件->保存屏幕截图
or
或
Press ⌘+S
按⌘+年代
Screen shot saves in desktop
屏幕截图保存在桌面上。
#8
2
First, run the app on simulator. Then, use command+s, or File -> Save Screenshot in Simulator to take necessary and appropriate shots. The screenshots will appear on your desktop by default.
首先,在模拟器上运行应用程序。然后,在模拟器中使用命令+s或File ->保存屏幕截图,进行必要和适当的拍摄。默认情况下,屏幕截图会出现在你的桌面上。
#9
1
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.
在OSX队长它的一个错误,以截屏模拟器。你必须先更新你的OSX Sierra,然后你才能使用。当接收OSX队长使用终端命令是xcrun simctl io启动屏幕截图。
before running this command u have to select desktop in terminal like:
在运行此命令之前,您必须在终端中选择桌面,如:
"cd desktop" then run that command. Happy Coding!!!
“cd桌面”然后运行该命令。编码快乐! ! !
#10
0
Press ⌘S or go to File > Save screenshot from your simulator menu and you will get the screenshot saved on your desktop.
按⌘S或去文件>保存截图从你的模拟器菜单上,你将会得到截图保存在桌面上。
#11
0
Taking Screen Shot in IOS Simulator is SO Simple.
在IOS模拟器中拍摄屏幕是如此简单。
When you Open Simulator In the Right Lift You See File.
当你在右升降机中打开模拟器,你会看到文件。
Click On File And You See Option Save Screen Shot.
单击File,您将看到“保存屏幕快照”选项。
This Option Saves Your Screen Shot In Default Path Which is Desktop.
此选项将在默认的桌面路径中保存屏幕快照。
#12
0
For some reason the commands posted before dont work for me, but this one does:
由于某些原因,我以前发布的命令并不管用,但这一条管用:
xcrun simctl io booted screenshot screenshot.png
Running Xcode 9.2
运行Xcode 9.2
#13
-1
This are the two new features for the Xcode 8.2 Simulator:
这是Xcode 8.2模拟器的两个新特性:
Try this below command in Terminal and the screen shot will be stored in the Terminal default location where the command is executed.
在终端尝试以下命令,屏幕快照将存储在执行命令的终端默认位置。
You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility.
您可以使用xcrun Xcode命令行实用程序拍摄模拟器的视频和屏幕快照。
???? To take a screenshot, run the command xcrun simctl io booted screenshot
????采取screenshot,运行该命令xcrun simctl io启动截图
#14
-1
First method:
第一种方法:
Select simulator and press "command + s" button. Screenshot saved on desktop.
选择模拟器并按“命令+ s”按钮。截图保存在桌面。
Second method:
第二种方法:
Select simulator and go to "File > New Screenshot". Screenshot saved on desktop.
选择模拟器,进入“File > New Screenshot”。截图保存在桌面。
#1
620
It's just as simple as command+s or File
> Save Screen Shot
in iOS Simulator. It will appear on your desktop by default.
它和命令+s或文件>在iOS模拟器中保存屏幕截图一样简单。默认情况下,它会出现在您的桌面上。
#2
34
on iOS Simulator,
在iOS模拟器,
Press Command + control + c
or from menu : Edit>Copy Screen
按命令+控制+ c或从菜单:编辑>复制屏幕
open "Preview" app, Press Command + n
or from menu : File> New from clipboard , then you can save command+s
打开“预览”应用,按命令+ n或从菜单:文件>新从剪贴板,然后您可以保存命令+s
For Retina, activate iOS Simulator then on menu:
HardWare>Device>iPhone (Retina)
and follow above process对于视网膜,激活iOS模拟器,然后在菜单上:硬件>设备>iPhone (Retina)并遵循以上过程
Command + S
is the way to save on Desktop, (on new iPhone simulators, this was introduced in later simulator)
是在桌面上保存的方法(在新的iPhone模拟器上,这是在后来的模拟器中引入的)
#3
14
Use ⌘ + S to capture a screen shot.
(Use window + s, if you are using windows/non-apple keyboard).
使用⌘+ S来捕获一个屏幕截图。(如果你使用的是windows/非苹果键盘,请使用windows + s)。
See for more details: How to change simulator scale options with Xcode 9+.
查看更多细节:如何使用Xcode 9+更改模拟器比例选项。
Tip 1: How do you get screen shot with 100% (a scale with actual device size) that can be uploaded on AppStore?
提示1:如何在AppStore上上传100%的屏幕截图(一个实际设备大小的比例)?
Disable Optimize Rendering for Window scale
from Debug
menu, before you take a screen shot.
在进行屏幕快照之前,从Debug菜单中禁用窗口缩放的优化渲染。
Here is an option
这是一个选择
Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale"
菜单条▶▶禁用调试“窗口规模优化渲染”
Tip 2: Where is screen shot saved (Default Path)? How to change default path?
提示2:屏幕截图保存在哪里(默认路径)?如何更改默认路径?
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.
更改默认路径与Xcode 9 +(),按住⌥从键盘选项(alt)按钮,当你屏幕截图。或者使用Mac Keyboad:按钥匙⌥选项+⌘+ s。它将显示给带有文件存储选项的对话框,并允许设置/更改默认路径。
Tip 3: How to take a screen shot with Device Bezel?
技巧3:如何使用设备面板拍摄屏幕截图?
Enable Show Device Bezel
from Window
menu.
从窗口菜单中启用显示设备边框。
Here is an option
这是一个选择
Menubar ▶ Window ▶ Enable "Show Device Bezel"
窗口菜单条▶▶启用“显示设备边框”
Now,
现在,
- Press ⌘ + shift + 4 + Spacebar, all together in Mac Keyboard. (A window snap capture mode will become active)
- 按⌘+ shift + 4 +空格键,所有在Mac键盘。(窗口抓拍模式将变为活动模式)
- 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. - 选择你想要捕获的模拟器窗口/框架。它将在(登录用户的)桌面上保存带有设备边框的屏幕截图(在后台有阴影效果)。
#4
13
Press Command+Shift+4
and then keep the mouse pointer on Simulator and then press "Space Bar"
key one camera icon will appear, now left click
the mouse. Your simulator screen shot is saved on desktop. You can take the screen shot any small screen in the same way.
按下命令+Shift+4,然后将鼠标指针放在模拟器上,然后按下“空格键”键将出现一个摄像头图标,现在鼠标左键点击鼠标。你的模拟屏幕截图保存在桌面上。你可以用同样的方法拍摄任何一个小屏幕。
#5
13
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.
您可以谷歌用于IOS模拟器Cropper软件,这款软件对捕捉屏幕快照很有用,也可以很容易地与各种拍照选项一起使用,比如带模拟器/不带模拟器的快照。
Update Just pressing CMD + S will give you screenshot saved on desktop. Pretty easy huh..
更新只需按下CMD + S就会给你在桌面上保存的截图。很简单啊. .
#6
11
Since Xcode 8.2, you can also save a screenshot with the following command:
由于Xcode 8.2,您还可以通过以下命令保存屏幕截图:
xcrun simctl io booted screenshot
xcrun simctl io启动截图
Further information in this blog: https://medium.com/@hollanderbart/new-features-in-xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0
本博客的进一步信息:https://medium.com/@hollanderbart/new- featuresin xcode-8-2-simulator-fc64a4014a5f#.bzuaf5gp0
#7
10
- Focus simulator
- 专注模拟器
-
Go to menu File->Save Screen Shot
进入菜单文件->保存屏幕截图
or
或
Press ⌘+S
按⌘+年代
Screen shot saves in desktop
屏幕截图保存在桌面上。
#8
2
First, run the app on simulator. Then, use command+s, or File -> Save Screenshot in Simulator to take necessary and appropriate shots. The screenshots will appear on your desktop by default.
首先,在模拟器上运行应用程序。然后,在模拟器中使用命令+s或File ->保存屏幕截图,进行必要和适当的拍摄。默认情况下,屏幕截图会出现在你的桌面上。
#9
1
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.
在OSX队长它的一个错误,以截屏模拟器。你必须先更新你的OSX Sierra,然后你才能使用。当接收OSX队长使用终端命令是xcrun simctl io启动屏幕截图。
before running this command u have to select desktop in terminal like:
在运行此命令之前,您必须在终端中选择桌面,如:
"cd desktop" then run that command. Happy Coding!!!
“cd桌面”然后运行该命令。编码快乐! ! !
#10
0
Press ⌘S or go to File > Save screenshot from your simulator menu and you will get the screenshot saved on your desktop.
按⌘S或去文件>保存截图从你的模拟器菜单上,你将会得到截图保存在桌面上。
#11
0
Taking Screen Shot in IOS Simulator is SO Simple.
在IOS模拟器中拍摄屏幕是如此简单。
When you Open Simulator In the Right Lift You See File.
当你在右升降机中打开模拟器,你会看到文件。
Click On File And You See Option Save Screen Shot.
单击File,您将看到“保存屏幕快照”选项。
This Option Saves Your Screen Shot In Default Path Which is Desktop.
此选项将在默认的桌面路径中保存屏幕快照。
#12
0
For some reason the commands posted before dont work for me, but this one does:
由于某些原因,我以前发布的命令并不管用,但这一条管用:
xcrun simctl io booted screenshot screenshot.png
Running Xcode 9.2
运行Xcode 9.2
#13
-1
This are the two new features for the Xcode 8.2 Simulator:
这是Xcode 8.2模拟器的两个新特性:
Try this below command in Terminal and the screen shot will be stored in the Terminal default location where the command is executed.
在终端尝试以下命令,屏幕快照将存储在执行命令的终端默认位置。
You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility.
您可以使用xcrun Xcode命令行实用程序拍摄模拟器的视频和屏幕快照。
???? To take a screenshot, run the command xcrun simctl io booted screenshot
????采取screenshot,运行该命令xcrun simctl io启动截图
#14
-1
First method:
第一种方法:
Select simulator and press "command + s" button. Screenshot saved on desktop.
选择模拟器并按“命令+ s”按钮。截图保存在桌面。
Second method:
第二种方法:
Select simulator and go to "File > New Screenshot". Screenshot saved on desktop.
选择模拟器,进入“File > New Screenshot”。截图保存在桌面。