• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - 删除/private/tmp 后无法启动 iOS 模拟器

[复制链接]
菜鸟教程小白 发表于 2022-12-13 10:06:44 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

本周我无法启动我的模拟器,我尝试了一些文章中的几种解决方案,但它不起作用。我的 MacOS 版本是 OS X 10.10.5 (14F27),我的模拟器是 iOS 8.4。

我从 ~/Library/Logs/CoreSimulator/CoreSimulator.log 获取日志

Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.SystemConfiguration.PPPController: launch_sim_register_endpoint: 0xfffffecc Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.audio.audiohald: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.FSEvents: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service com.apple.SystemConfiguration.configd: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service IndigoHIDRegistrationPort: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service PurpleFBTVOutServer: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Could not register service PurpleFBServer: launch_sim_register_endpoint: 0x44e Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fbb204683f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fbb204683f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb20808710 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error looking up host support port Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Invalid device state" UserInfo=0x7fbb2083b420 {NSLocalizedDescription=Invalid device state} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb2080c350 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb2080c350 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local com.apple.iphonesimulator[8330] : Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7fda2a9020f0 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Unable to lookup in current state: Shutdown" UserInfo=0x7fbb20b0f850 {NSLocalizedDescription=Unable to lookup in current state: Shutdown} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error looking up host support port Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : Error Domain=com.apple.CoreSimulator.SimError Code=146 "Invalid device state" UserInfo=0x7fbb20b00e20 {NSLocalizedDescription=Invalid device state}

有人对此有任何想法吗?

我会很感激的!

最后我在@Jeremy Huddleston Sequoia 的帮助下解决了这个问题。一开始,我在网上尝试了很多解决方案,包括删除/private/tmp 文件夹。所以无论我清理多少次重新安装模拟器,它都不起作用。所以要小心这个



Best Answer-推荐答案


这些错误表明 launchd_sim 未加载或未运行,并且看门狗已触发以通知您失败。

如果您在 OS X 10.10.5 中禁用 AMFI,模拟器运行时将无法使用,并且会像这样显示。

但是,在您的情况下,launchd_sim 在启动时崩溃。崩溃日志表明它在尝试在/private/tmp 中创建其状态目录时遇到错误。

这可能发生在您删除/private/tmp (或错误地重新创建它)。要创建/private/tmp,请执行以下操作:

sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp

关于ios - 删除/private/tmp 后无法启动 iOS 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32239906/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap