Xcode 10.0模拟器无法启动

Lia*_*tom 2 xcode simulator

我最近一直在尝试使用最新版本的Xcode(10.0),但是当我打开模拟器时出现错误提示

“模拟器无法启动”

我尝试下载以前的版本,但仍然遇到相同的错误。

附加问题的屏幕截图

Dom*_*her 5

您的模拟器可能会陷入某种循环,请尝试在bash中运行此程序:

以下几行删除所有模拟器

xcrun simctl shutdown all  
xcrun simctl delete $(xcrun simctl list | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}' | xargs)
xcrun simctl delete unavailable
Run Code Online (Sandbox Code Playgroud)

然后,您可以再次通过xcrun simctl或通过xcode安装所有设备。只需在bash中逐行再次运行此代码:

# This takes latest runtime available in xcode build. (IT counts with beta...)
runtime=$(xcrun simctl list runtimes | grep "iOS" | tail -1 | awk -F' - ' '{print $3F}')

# Simulators should carry the iOS version. And probably CI Prefix.
# Check if simulators alreadz exists.
echo "The current iOS runtime is: $runtime"
xcrun simctl create "iPhone 7" com.apple.CoreSimulator.SimDeviceType.iPhone-7 $runtime
Run Code Online (Sandbox Code Playgroud)

  • 此修复程序的完美答案是/sf/answers/3365276911/ (2认同)

归档时间:

查看次数:

2327 次

最近记录:

6 年,1 月 前