ios - 在较旧的 iOS 模拟器上运行时,错误 "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding"

标签 ios xcode ios-simulator apple-silicon

我在我的 M1 MacBook Pro 上运行 Xcode 12.2 (12B45b)。每当我尝试在旧版 iOS 上运行模拟器时,例如:

iPhone 11 Pro (13.0)

这是行不通的。 Xcode 弹出这个错误:

Failed to start launchd_sim...

当我按下 Details 时,会弹出一个屏幕显示:

Details

Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding
Domain: com.apple.SimLaunchHostService.RequestError
Code: 4
--


System Information

macOS Version 11.0 (Build 20A2411)
Xcode 12.2 (17535) (Build 12B45b)
Timestamp: 2020-12-06T12:41:11-08:00

但是,如果我运行 14.2 等较新的 iOS,它会完美运行。这是 Xcode 预装的运行时。

Working perfectly

我看了这个问题,iOS Simulator is Crashing on startup ,但答案几乎没有用。其他一些人在 Dev Forums 上遇到了同样的问题, 但也没有人有解决方案。

编辑: release notes 上似乎提到了这一点对于 Xcode 12.2:

Simulator runtimes for iOS 13, tvOS 13, and watchOS 6 and earlier don’t work on the Developer Transition Kit. Preferences offers these runtimes for download, but creating a simulated device from one of these runtimes fails, claiming the runtime is unavailable. Other Macs with Apple silicon support a limited set of older simulator runtimes for iOS and tvOS. (66115743, 70472441) (FB8157217)

最佳答案

我通过删除模拟器缓存解决了这个问题:

~/Library/Developer/CoreSimulator/Caches

macOS 蒙特雷 12.0.1,Xcode 13.3.1

关于ios - 在较旧的 iOS 模拟器上运行时,错误 "Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65172944/

相关文章:

ios - 子类化后的AVPlayerViewController横向定位

ios - 如何通过带参数的方法将 UIButton 设置为 Action 实现?

ios - 如何使用 swift iOS(不使用 UITextView)进行多行扩展 UTextField 或文本输入

iOS:我可以创建一个所有类(.h 和 .m)都为公共(public)的静态库吗?

xcode - 如果我在 Mac OS 上安装 Homebrew,是否需要使用 XCode 作为我的 IDE?

ios - UIToolBar 在 3.5 英寸模拟器中不显示

ios - 从另一个 Controller 调用 awakeFromNib

ios - 如何创建可重用的自定义控件并在 Storyboard 中使用它?

ios - 运行模拟器时偶尔会出现引用 Gatekeeper 的日志消息

ios - iOS模拟器-如何测试较旧的(32位)设备?