iOS模拟器 Unable to boot the Simulator —— Ficow笔记

本文首发于 Ficow Shen's Blog,原文地址: iOS模拟器 Unable to boot the Simulator ------ Ficow笔记

内容概览

  • 前言
  • 终结模拟器进程
  • 命令行改权限
  • 清除模拟器缓存
  • 总结

前言

iOS模拟器和Xcode一样不靠谱,问题也不少。😂 那就有病治病,然后把疗法记下来~

问题详情

不能启动模拟器的问题成因可能有很多种,Ficow 遇到的最多的就是这种情况:

复制代码
Unable to boot the Simulator.
Domain: NSPOSIXErrorDomain
Code: 60
Failure Reason: launchd failed to respond.
User Info: {
    DVTErrorCreationDateKey = "202X-0X-22 00:57:58 +0000";
    IDERunOperationFailingWorker = "_IDEInstalliPhoneSimulatorWorker";
    Session = "com.apple.CoreSimulator.SimDevice.73117569-D917-45A8-A50C-4E67720783E0";
}


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

终结模拟器进程

通常,只需要先退出Xcode,然后在活动监视器中手动干掉 simulator 相关的进程就可以解决问题。如果还不行,那就重启电脑吧~

第一步,干掉 SimuLaunchHost 进程:

强制退出:

第二步,干掉其他 simulator 进程:

强制退出:

如果你没有退出Xcode,强制退出这些进程之后,它们会重启。

命令行改权限

如果上面的方法还不行,你也可以试试这个命令。不过这个命令在 Ficow 这里没效果。

sh 复制代码
sudo chmod 1777 /Volumes/Macintosh\ HD/private/tmp

清除模拟器缓存

或者,执行以下命令打开该文件夹,删除Caches文件夹以清理模拟器的缓存。Ficow 实测有效~

复制代码
open ~/Library/Developer/CoreSimulator/Caches

总结

有些问题确实是模拟器本身的问题,不过有些问题可能是macOS导致的,不同的OS版本也有不同的bug。

毕竟,软件没bug是不太可能的~

参考内容:
"Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed"

相关推荐
weixin_403810133 小时前
EasyClick iOS自动化代理IPA挂了 如何再次启动?
android·ios·自动化
Unstoppable224 小时前
iOS App 开发攻略
ios·xcode·软件开发
2501_9159184120 小时前
如何在iPad上找到并打开文件夹的完整指南
android·ios·小程序·uni-app·iphone·webview·ipad
2501_915918411 天前
Wireshark、Fiddler、Charles抓包工具详细使用指南
android·ios·小程序·https·uni-app·iphone·webview
TheNextByte12 天前
如何将文件从Android无线传输到 iPad
android·ios·ipad
2501_915106322 天前
如何在iPad上高效管理本地文件的完整指南
android·ios·小程序·uni-app·iphone·webview·ipad
2501_915106322 天前
iOS 成品包加固,在只有 IPA 的情况下,能做那些操作
android·ios·小程序·https·uni-app·iphone·webview
Free Tester2 天前
在iPhone上显示点击屏幕点击的方法
功能测试·ios·iphone
AALoveTouch2 天前
某麦APP抢票技术解析实现
android·ios
2501_915909062 天前
苹果iOS应用上架详细流程与注意事项解析
android·ios·小程序·https·uni-app·iphone·webview