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"

相关推荐
2501_9160074731 分钟前
iOS 自动化上架的工具组合,在多平台环境中实现稳定发布
android·运维·ios·小程序·uni-app·自动化·iphone
TO_ZRG35 分钟前
iOS 符号表文件概要
macos·ios·cocoa
shankss16 小时前
GetX 状态管理详解
android·flutter·ios
shankss19 小时前
Flutter 项目启动全流程详解
android·flutter·ios
__WanG2 天前
如何申请 Family Controls 权限
ios·swiftui·权限·应用时间管理
杭城小刘3 天前
Weex 底层原理与 APM
ios·前端框架·weex
2501_924064113 天前
2025年移动应用渗透测试流程方案及iOS安卓测试方法对比
android·ios
鼹鼠SDN4 天前
【保姆教程】iPhone、iPad上玩电脑游戏 异地串流
ios·iphone·ipad·moonlight·sunshine·串流·科技数码
初级代码游戏4 天前
iOS开发 SwiftUI 2 : Image
ios·swiftui·swift
TheNextByte14 天前
如何在不使用 iCloud 的情况下备份 iPhone 短信
ios·iphone·icloud