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"

相关推荐
开开心心loky3 小时前
[iOS] GCD - 线程与队列
macos·ios·objective-c·cocoa
00后程序员张6 小时前
iOS 上架费用全解析 开发者账号、App 审核、工具使用与开心上架(Appuploader)免 Mac 成本优化指南
android·macos·ios·小程序·uni-app·cocoa·iphone
fukai772211 小时前
OmniFocus:专为 macOS 与 iOS 打造的专业级任务管理利器
macos·ios
行走的陀螺仪12 小时前
Flutter 开发环境配置教程
android·前端·flutter·ios
请叫我飞哥@13 小时前
获取 Apple 授权登录的 Token
ios·swiftui·swift
QuantumLeap丶14 小时前
《Flutter全栈开发实战指南:从零到高级》- 12 -状态管理Bloc
android·flutter·ios
方君宇14 小时前
SwiftUI ScrollView导致视图塌陷(高度为0)问题
ios
2501_9160088914 小时前
HTTPS 请求抓包,从原理到落地排查的工程化指南(Charles / tcpdump / Wireshark / Sniffmaster)
ios·小程序·https·uni-app·wireshark·iphone·tcpdump