我可以在 Xcode 7.1 或最新版本中为新项目设置默认模拟器吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33577934/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I set the default simulator for new projects in Xcode 7.1 or latest?
提问by Evan Pon
I've been making a ton of new projects as I'm learning Swift. My development is all on my laptop, so I hate using the default 6s Plus simulator, since the window is too big to easily see. Is there a way to change the default simulator to be a different one for new projects?
在学习 Swift 的过程中,我一直在制作大量新项目。我的开发全部在我的笔记本电脑上进行,所以我讨厌使用默认的 6s Plus 模拟器,因为窗口太大而无法轻松看到。有没有办法将默认模拟器更改为新项目的不同模拟器?
回答by Rudolf Adamkovi?
回答by matt
No. But...
不是,但...
If you don't like the size of the 6s plus simulator, make it smaller with the simulator Window Scale menu.
If you don't like the 6s plus simulator at all, delete it with the Xcode Window Devices menu.
如果您不喜欢 6s plus 模拟器的大小,请使用模拟器 Window Scale 菜单将其缩小。
如果您根本不喜欢 6s plus 模拟器,请使用 Xcode Window Devices 菜单将其删除。
回答by PatTheBeast
Xcode 9 UPDATE:
Xcode 9 更新:
In Xcode 9, no need to delete simulators, and the way to turn them on/off is to go in Product/Destination/Add Additional Simulators... select the simulator you want to turn off, then uncheck the box: 'Show as run destination'
在 Xcode 9 中,无需删除模拟器,打开/关闭它们的方法是进入 Product/Destination/Add Additional Simulators... 选择要关闭的模拟器,然后取消选中该框:'Show as运行目的地'
回答by zslavman
You can select the desired simulator via the Hardware > Device > [OS] menu (Xcode 9):
您可以通过硬件 > 设备 > [OS] 菜单 (Xcode 9) 选择所需的模拟器:
While unchecking "Show as run destination" hides the simulator, this will also change the default value.
取消选中“显示为运行目标”会隐藏模拟器,这也会更改默认值。
回答by Hyman Ngai
Deleting the simulators you don't want will default you to the simulator you do want. I also develop on my laptop and the biggest simulator I can see w/o scaling down is the 4S, so I deleted simulators for iPhone 5 and above and now every project I create defaults to 4S simulator. If I ever need the newer simulators, I will just re-download.
删除您不想要的模拟器将使您默认使用您想要的模拟器。我也在我的笔记本电脑上开发,我可以看到最大的模拟器是 4S,所以我删除了 iPhone 5 及更高版本的模拟器,现在我创建的每个项目都默认为 4S 模拟器。如果我需要更新的模拟器,我会重新下载。
回答by YinPeng.Wei
open your simulator, choose **File/Open Device/iOS 13.5/iPhone8 ** will change your simulator device to iPhone 8. When you reopen your simulator, iPhone 8 will be your device simulator.
打开您的模拟器,选择 **File/Open Device/iOS 13.5/iPhone8 ** 会将您的模拟器设备更改为 iPhone 8。当您重新打开模拟器时,iPhone 8 将成为您的设备模拟器。