我安装了Xcode-11-测试版和macOS 10.15测试版。一开始,我可以正常地玩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发布于 2019-06-25 12:16:21
CoreSimulator目前不喜欢将simruntime捆绑包从它下面移出。通过从~/Downloads启动,它知道了iOS 13的iOS.simruntime,然后您移动了它。
在这个特定的案例中,你可以通过杀死com.apple.CoreSimulator.CoreSimulatorService来解决这个问题。
https://stackoverflow.com/questions/56462769
复制相似问题