iosswiftxcodeios-simulator

Xcode 12.5.1 - Could not attach to pid: "####" - Lost Connection


Error Message

I am getting this error message whenever I try to run any of my iOS projects on the simulator. How do I get rid of this?

I have already tried Cleaning the build folder, and erasing all content and settings of the simulator, tried different simulators as well as closing and starting the Xcode again.

Details

Could not attach to pid : “3386”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: lost connection
User Info: {
    DVTRadarComponentKey = 855031;
    RawUnderlyingErrorMessage = "lost connection";
}
--


System Information

macOS Version 12.0 (Build 21A5304g)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-08-25T12:20:16+05:00

Solution

  • This problem might be related to the beta version of macOS that you use.

    I suggest using the Xcode 13 Beta from Apple for developers. You need a free apple developer account to access this download.

    For me this solved all problems.