【问题标题】:Encountered an error communicating with IBAgent-iOS. Failed to boot device iPhone Xs与 IBAgent-iOS 通信时遇到错误。无法启动设备 iPhone Xs
【发布时间】:2019-12-31 22:58:42
【问题描述】:

我在 Xcode 10.3 的界面构建器顶部收到错误消息,在单击报告错误并检查 log.txt 文件时,我发现无法打开模拟器。但是我没有启动任何模拟器。

这是在 Log.txt 中发现的错误

Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS failed to launch): Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS (Failure reason: Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown)): Unable to boot the Simulator. (Failure reason: launchd failed to respond.)

Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS failed to launch, NSUnderlyingError=0x7fe80ae44440 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=Failed to boot iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown), NSLocalizedDescription=Failed to boot device iPhone Xs (0B8270CC-2BFB-4BB6-90A5-6BA61468A1AD, iOS 12.4, Shutdown) for context <IBCocoaTouchToolLaunchContext: 0x7fe80e754ad0> toolName = IBAgent-iOS, description = <IBCocoaTouchPlatformToolDescription: 0x7fe80e2a0290> System content for IBCocoaTouchFramework-ElevenAndLater <IBSimulatorDeviceTypeDescription: 0x7fe80fab2f90> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XS, NSUnderlyingError=0x7fe80bd300f0 {Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedFailureReason=launchd failed to respond., NSLocalizedDescription=Unable to boot the Simulator.}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}

【问题讨论】:

  • 嗨 Dipen 我也遇到了同样的问题,你能解决这个问题吗?我正在使用 xcode 11.3,除了这个问题之外,我的模拟器在我运行项目后没有启动。
  • 同样的问题
  • 这里也一样。如果没有遇到这个问题,我什至无法创建新项目。看起来可能 11.3 打破了一些东西。在 11.2 中运行良好。

标签: swift xcode interface-builder ios-simulator xcode10.3


【解决方案1】:

如果有人在 Xcode 13 更新后仍在寻找这个问题的答案,我已经尝试了他们在互联网上提到的所有内容,但除了一个之外没有任何效果。唯一有效的是完全重新安装 Xcode。首先完全卸载/删除Xcode并重新启动mac并重新安装Xcode然后一切都应该很好。

  1. 从应用程序文件夹和清空垃圾箱中删除 Xcode。

  2. 转到 ~/Library/Developer 并删除 CoreSimulator、Xcode、XCTestDevices 文件夹。清空垃圾

  3. 转到 ~/Library/Caches 并删除以 com.apple.dt.Xcode 开头的所有内容,清空垃圾

然后重新启动您的 Mac 并重新安装 Xcode。我使用了我下载的 Xcode 应用程序,我猜 AppStore 安装也可以。

现在一切正常。

在此之前,我使用 Open as Source Code 模式更改了故事板文件(因为我无法在 Interface Builder 中打开它 - Xcode 只是挂起)

我将故事板设计设备更改为 iPhone 13,而不是旧设备版本。

<device id="retina6_7" orientation="portrait" appearance="light"/>

我用这条线改变了现有的线。在尝试使用 Interface Builder 打开时,它有点解决了 Xcode 挂起的另一个问题,但在尝试安装应用程序时并没有解决 Encountered an error communicating with IBAgent-iOS 问题。这个问题只有在我完全重新安装 Xcode 后才得到解决。

【讨论】:

  • 我尝试了一些不同的方法。当我第一次遇到这个问题时,我只需要清除~/Library/Developer/Xcode/iOS\ DeviceSupport 中的一些旧东西。然而,当我几个月后再次发现这个问题时,除了这个建议(谢谢!)之外,没有任何效果。我还使用此链接来帮助决定删除什么:izziswift.com/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-02-04
  • 2019-02-27
  • 2021-12-27
  • 1970-01-01
  • 1970-01-01
  • 2021-11-08
  • 1970-01-01
相关资源
最近更新 更多