13

I am getting an Error on the top of my interface builder in Xcode 10.3 and while clicking on report bug and checking the log.txt file I found out that fails to open simulator. However I am not starting any simulator.

Here is the Error found in 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.}
pkamb
  • 33,281
  • 23
  • 160
  • 191
Dipen Shah
  • 191
  • 1
  • 2
  • 6
  • Hi Dipen I am facing the same issue, were you able to solve the problem. I am working on xcode 11.3 and in addition to this issue my simulator is not booting up once I run the project. – Yaseen Majeed Jan 31 '20 at 07:10
  • Same issue here – pixel Jan 31 '20 at 23:10
  • Same here. I can't even create new projects without facing this issue. Looks like maybe 11.3 broke something. Works fine in 11.2. – Valentin Mar 08 '20 at 15:19
  • 1
    Solved similar issue, just install Windows and start developing for android os. – Bimawa Jul 31 '22 at 09:52

7 Answers7

10

If anyone still looking for an answer to this after Xcode 13 update, I have tried everything they mentioned on the internet and nothing worked except one. The only thing that worked is the complete re-installation of Xcode. Completely uninstall/delete Xcode first and restart the mac and reinstall Xcode then all should be good.

  1. Delete Xcode from Applications Folder and Empty Trash.

  2. Go to ~/Library/Developer and Delete CoreSimulator, Xcode, XCTestDevices Folder. Empty trash

  3. Goto ~/Library/Caches and delete everything starting with com.apple.dt.Xcode, Empty trash

Then Restart your Mac and reinstall Xcode. I used my downloaded Xcode app, AppStore installation will also work, I guess.

Now it all working.

Before that, I have changed the storyboard file using Open as Source Code mode (coz I couldn't open it in Interface Builder - Xcode just hang)

I changed the storyboard design device to iPhone 13 instead of the older device version it had.

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

I change the existing line with this line. It kinda solve another issue of Xcode hanging, when trying to open with Interface Builder, but it didn't solve Encountered an error communicating with IBAgent-iOS issue when trying to install the app. That issue only got solved when I completely reinstalled the Xcode.

RJE
  • 781
  • 6
  • 14
  • I've tried a few different things. When I first had this issue, I just had to clear out some old stuff in `~/Library/Developer/Xcode/iOS\ DeviceSupport`. However when I found this issue again a few months later, nothing worked other than this suggestion (thanks!). I also used this link to help decide what to delete: https://izziswift.com/how-to-completely-uninstall-xcode-and-clear-all-settings/ – larromba Nov 14 '21 at 11:21
  • This is already my third complete re-instalation of Xcode. Please no. – LucasMW May 03 '22 at 12:46
  • works like a charm . appreciated. i have not reinstall Xcode just do the 3 steps and restart mac andchanged the storyboard design device to iPhone 13 instead of the older device version it had. – Faiz Ul Hassan May 14 '22 at 07:13
  • the only way. that worked for me too – Artem Zaytsev Oct 06 '22 at 05:45
5

I have managed to fix it just by changing preview device on interface builder

5

In my case it helped:

  • clean project
  • remove derived data
  • close Xcode
  • restart Mac
Taras
  • 1,485
  • 1
  • 16
  • 31
1

I used DevCleaner XC helper app:

https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020431?mt=12

removed everything, and after that restarted mac. No XC reinstall needed.

nja
  • 308
  • 5
  • 11
-1

This problem caused because, I deleted all directories under "Library/Developer/Xcode" for a purpose. But, I realised I also deleted wrong directories in same time. Then I put back directories from the Bin. It is solved for me.

Yılmaz edis
  • 146
  • 3
  • 13
-1

If you have or have had multiple versions of Xcode open, you may need to reboot or completely re-install the CoreSimulatorService, an evil, globally installed background service that somehow remains online and available to many versions of Xcode despite it being compatible with only one version.

See more here: https://stackoverflow.com/a/72946533/731285

Other symptoms of this issue: Simulators not showing up in the Window > Devices and Simulators listing and simctl throwing errors and being unable to find base iOS SDKs similar to the following:

$ xcrun simctl list
...
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-15-5 --
    iPhone 8 (55A90310-8202-4A0D-968B-00F440D42210) (Shutdown) (unavailable, runtime profile not found)

See also:

markshiz
  • 2,501
  • 22
  • 28
-1

In my case, I just had to set team in

Project > Targets > Signing & Capabilities > Team > Personal Team

Klucze
  • 49
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 08 '22 at 14:25