【问题标题】:The iOS 13.0 simulator runtime is not availableiOS 13.0 模拟器运行时不可用
【发布时间】:2019-06-05 14:40:28
【问题描述】:

我随 macOS 10.15 beta 一起安装了 Xcode-11-beta。一开始我可以正常玩SwiftUI preview。但是在我尝试将 Xcode-beta 从最初安装它的~/Downloads 目录移动到/Applications 之后,预览无法工作。这是错误:

所以我把它移回~/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

【问题讨论】:

    标签: ios xcode swiftui ios-simulator xcode11


    【解决方案1】:

    CoreSimulator 目前不喜欢将 simruntime 包从其下移出。通过从~/Downloads 启动,它会发现适用于 iOS 13 的 iOS.simruntime,然后您将其移动。

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

    【讨论】:

    • 也遇到了这个问题,杀死 CoreSimulatorService 为我解决了这个问题。这应该是公认的答案。无需完全重启。
    • 像这样的绝对陈述既没有帮助,更重要的是,特别准确。我很高兴杀死 CoreSimultorService 对你有用。它不适合我。也没有完全重启。相反,我发现以下帖子中的建议有效。如果有的话,鉴于我们所有“机器”上的设置截然不同,您的评论显示了“可接受的答案”概念中的缺陷(致命的 imo)。也许是时候讨论这个想法本身的有效性了?发帖:stackoverflow.com/questions/57388536/…
    • killall com.apple.CoreSimulator.CoreSimulatorService 是对我有用的命令。
    【解决方案2】:

    奇怪的是我早上醒来并启动我的电脑,Canvas 和iOS 13.0 Simulator 现在可以工作了。

    所以,我想解决这个问题的方法可能只是残酷的重启。 ;]

    【讨论】:

      【解决方案3】:

      XCode 11 升级以一种我不完全理解的奇怪方式破坏了模拟器 - 我没有尝试过让模拟器在升级后运行,而且我找不到太多关于以下问题的明确答案为什么是这样,但以下两个命令为我解决了这个问题:

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

      【讨论】:

      • 嗨..我现在在 Xcode 11.3 上,需要使用较旧的 10.3.1 sim。我使用以下方法创建了它:$ xcrun simctl create "iPhone 6" "iPhone 6" iOS10.3.1 14E8301 37FAE547-CB68-4B76-81A3-8E748CC590B1。模拟器现在存在,我确认运行时已安装使用: xcrun simctl list devicetypes runtimes which shows iOS 10.3 (10.3.1 - 14E8301) - com.apple.CoreSimulator.SimRuntime.iOS-10-3 但是我无法获得新的模拟器出现在运行时目标列表中,因此我无法选择它来运行我的项目。你遇到过吗?
      猜你喜欢
      • 1970-01-01
      • 2015-12-21
      • 1970-01-01
      • 2021-12-05
      • 2013-11-11
      • 2014-11-11
      • 1970-01-01
      • 2014-10-17
      • 2017-11-17
      相关资源
      最近更新 更多