[英]Creating New Simulator Command Line- Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-13
Trying to create a new iOS simulator via the command line I ran尝试通过我运行的命令行创建一个新的 iOS 模拟器
$ xcrun simctl list devicetypes runtimes
which gave me这给了我
iPhone SE (1st generation) (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
But when I tried to install the simulator I keep getting但是当我尝试安装模拟器时,我不断得到
Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-13
运行时无效:com.apple.CoreSimulator.SimRuntime.iOS-13
I tried我试过了
$ xcrun simctl create 'iPhone SE (1st generation)' com.apple.CoreSimulator.SimDeviceType.iPhone-SE com.apple.CoreSimulator.SimRuntime.iOS-13
and和
xcrun simctl create "iPhone SE (1st generation)" "com.apple.CoreSimulator.SimDeviceType.iPhone-SE" "com.apple.CoreSimulator.SimRuntime.iOS-13"
I also tried iOS 14 but the same issue occurred我也试过 iOS 14 但发生了同样的问题
$ xcrun simctl create ... com.apple.CoreSimulator.SimRuntime.iOS-14
run跑
$ xcrun simctl create "MY-iPhone-SE-1stGen" "iPhone SE (1st generation)" iOS13
which will return a device uuid like这将返回一个设备uuid,如
47F03253-EAA7-4682-80BA-C6769471993D
then to boot up the simulator you have use the device uuid to run然后启动你使用设备 uuid 运行的模拟器
$ xcrun simctl boot 47F03253-EAA7-4682-80BA-C6769471993D
In the Xcode device drop down list you will see在 Xcode 设备下拉列表中,您将看到
MY-iPhone-SE-1stGen MY-iPhone-SE-1stGen
FYI you can use whatever name you want in place of MY-iPhone-SE-1stGen仅供参考,您可以使用任何您想要的名称来代替MY-iPhone-SE-1stGen
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.