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

 

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

内容概览

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

 

前言

 

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

 

问题详情

 

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

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

iOS模拟器 Unable to boot the Simulator —— 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 进程:
iOS模拟器 Unable to boot the Simulator —— Ficow笔记

强制退出:
iOS模拟器 Unable to boot the Simulator —— Ficow笔记

第二步,干掉其他 simulator 进程:
iOS模拟器 Unable to boot the Simulator —— Ficow笔记

强制退出:
iOS模拟器 Unable to boot the Simulator —— Ficow笔记

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

 

命令行改权限

 

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

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"

 

发表评论

评论已关闭。

相关文章