如何在 Xcode 中运行 iPad 模拟器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48346709/
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
How do I run an iPad Simulator in Xcode?
提问by psvj
I am trying to run an iPad simulator on Xcode, but currently I only have one option when I go to Xcode > Open Developer Tool > Simulator, which launches the iPhone simulator.
我正在尝试在 Xcode 上运行 iPad 模拟器,但目前我只有一个选项,当我转到 Xcode > Open Developer Tool > Simulator 时,它会启动 iPhone 模拟器。
How do I launch the iPad simulator?
如何启动 iPad 模拟器?
回答by Tamás Sengel
You should select an iPad device by navigating to
您应该通过导航到 iPad 设备
Hardware/Device/[OS version if you have multiple OS versions installed]/[device]
硬件/设备/[操作系统版本,如果您安装了多个操作系统版本]/[设备]
in the simulator's menu.
在模拟器的菜单中。
If there are no iPad devices in the list, follow these instructions:
如果列表中没有 iPad 设备,请按照以下说明操作:
Click on Hardware/Device/Manage Devices...
Select the Simulatorsoption on the top.
Press the plus (+) sign in the lower-left corner.
Define the name, the device type and the OS version of the new simulator, then click on Create.
For more information, check out Getting started in Simulator.
有关更多信息,请查看模拟器入门。
回答by Aaron
For bonus points :)
对于奖励积分:)
I would also extract the simulator from inside Xcode to make it more accessible.
我还会从 Xcode 内部提取模拟器以使其更易于访问。
Applications / Xcode.app
( right click and select "Show Package Contents" )
Applications / Xcode.app
(右键单击并选择“显示包内容”)
From this folder Contents / Developer / Applications / Simulator.app
从这个文件夹 Contents / Developer / Applications / Simulator.app
Create a shortcut to that and simulator opens without opening the main Xcode.app
创建一个快捷方式,无需打开主 Xcode.app 即可打开模拟器
回答by ROOT
This is for Xcode 11.2.1+
这适用于 Xcode 11.2.1+
open XCode, from the App menu:
从 App 菜单中打开 XCode:
Xcode -> Open Developer Tool -> Simulator
Xcode -> 打开开发者工具 -> 模拟器
This will open the latest iPhone simulator and to change it to anything else e.g iPad:
这将打开最新的 iPhone 模拟器并将其更改为其他任何东西,例如 iPad:
Hardware -> Device -> iOS -> iPad
硬件 -> 设备 -> iOS -> iPad