iOS 13.0模拟器运行时不可用

时间:2019-06-05 14:40:28

标签: ios-simulator swiftui xcode11

我安装了Xcode-11-beta和macOS 10.15 beta。首先,我可以正常玩SwiftUI preview。但是,当我尝试将Xcode-beta从最初安装它的~/Downloads目录移动到/Applications时,预览无法正常工作。这是错误:

enter image description here

因此,我将其移回了~/Downloads,希望一切能够像以前一样顺利。但是它给出了相同的错误。

此后,我重新安装了它,但仍然出现此错误。谁能帮我解决这个问题?

诊断报告的内容是这样的:

== DATE:

Wednesday, June 5, 2019 at 10:25:46 PM China Standard Time



== PENDING U

    PDATE REASONS:





== PREVIEW UPDATE ERROR:

    unexpected error occurred

    Error Domain=com.apple.CoreSimulator.SimError Code=161 "The iOS 13.0 simulator runtime is not available." UserInfo={NSLocalizedRecoverySuggestion=Download the iOS 13.0 simulator runtime from the Components section in Xcode's Preferences., NSLocalizedFailureReason=runtime path not found, NSLocalizedDescription=The iOS 13.0 simulator runtime is not available.}



== VERSION INFO:

    Tools: 11M336w

    OS:    19A471t



== ENVIRONMENT:

    [x] In valid workspace
    [x] Project is using the new build system
        Previews are available for targets that are built with the new build system. Change your project to use the new build system.
    [x] Selected scheme (Landmarks)
        Select a scheme from the scheme picker in the toolbar
    [x] Selected run destination (iPhone 8)
        Select a run destination from the scheme picker in the toolbar
    [x] Have workspace arena
        Try quitting and reopening your workspace
    [x] Have build arena
        Try quitting and reopening your workspace
    [x] Open file has supported build settings

3 个答案:

答案 0 :(得分:4)

奇怪的是我早上醒来并启动计算机,CanvasiOS 13.0 Simulator现在可以工作。

所以,我想解决的方法可能只是重新启动。 ;]

答案 1 :(得分:2)

CoreSimulator当前不喜欢将simruntime包从其下面移出。通过从~/Downloads启动,它知道了iOS 13的iOS.simruntime,然后将其移动。

在这种特定情况下,您可以通过杀死com.apple.CoreSimulator.CoreSimulatorService来解决此问题。

答案 2 :(得分:1)

XCode 11升级以一种我不完全理解的怪异方式破坏了模拟器-我尝试过的任何事情都无法使模拟器在升级后运行,并且我找不到很多明确的答案为什么是这种情况,但是以下两个命令为我解决了这个问题:

  • sudo xcrun simctl shutdown all
  • sudo xcrun simctl erase all