108

I was able to run iOS simulator fine with Xcode 14 and my Mac recently updated the latest version of Xcode which is 15 then I'm no longer able to boot a device from its new simulator.

I did try many different ways collected from many sources but no avail. Here are the few things that I already tried and none of them worked for me:

BTW here is the full log that I collected as run it via cli:

xcrun simctl boot 39C3D624-968A-49F7-A155-AC9AC1A81B52
Unable to boot the Simulator.
Domain: NSPOSIXErrorDomain
Code: 60
Failure Reason: launchd failed to respond.
User Info: {
    DVTErrorCreationDateKey = "2023-09-26 04:06:49 +0000";
    IDERunOperationFailingWorker = "_IDEInstalliPhoneSimulatorWorker";
    Session = "com.apple.CoreSimulator.SimDevice.AC5CB945-2257-4E8C-AA61-ABC5AC147D84";
}
--
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
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone16,1";
    "device_osBuild" = "17.0 (21A328)";
    "device_platform" = "com.apple.platform.iphonesimulator";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 23640;
    "operation_errorCode" = 60;
    "operation_errorDomain" = NSPOSIXErrorDomain;
    "operation_errorWorker" = "_IDEInstalliPhoneSimulatorWorker";
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphonesimulator";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphonesimulator17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphonesimulator;
}
--

System Information

macOS Version 13.6 (Build 22G120)
Xcode 15.0 (22265) (Build 15A240d)
Timestamp: 2023-09-26T11:06:49+07:00

I will appreciate any help!

Update on 28th Sep 2023

I just upgraded macOS to the latest version v14 with name (Sonoma)and tried to remove all caches again but still no avail :(

Update on 29th Sep 2023

I also tried to download 3 last iOS versions and interestingly the iOS 15 works for me while none of the 2 others still work.

Update on 16th Nov 2023 (important)

I just re-open the simulator and somehow it suddenly works automatically without doing anything, not sure what has been updated from Apple makes it working. Anyway, this is a good news and I guess Apple might have been aware of the bug and released a fix silently

8
  • Have you tried removing the derived data? .../Library/Developer/Xcode/DerivedData
    – iphony
    Commented Sep 26, 2023 at 6:04
  • Yes I deleted everything that I know which contains this one too
    – tmhao2005
    Commented Sep 26, 2023 at 6:11
  • 2
    same error, same steps taken, same result... I'm using the last intel based macboo pro, all my collegues already have M1 or M2 macs and don't have issues... I hope it has nothing to to with the architecture Commented Sep 26, 2023 at 11:56
  • 2
    hmm it doesn't sound like to happen to everyone since my Mac is the M1 one
    – tmhao2005
    Commented Sep 26, 2023 at 13:07
  • 6
    I have the same issue and I'm using an M1 MacBook Pro so it appears to impact both architectures.
    – Joe G
    Commented Sep 27, 2023 at 19:01

17 Answers 17

245

Here is what worked for me. I am using Xcode Version 15.2

Solution

  1. Open System Settings
  2. Search Storage >> Developer
  3. Delete Xcode caches, project archives and Project Build Data and Indexes

image

10
  • 10
    Thank you, this worked for me on Xcode 15.2. Didn't have to delete Project Archives, just the other two.
    – pius
    Commented Jan 22 at 7:53
  • 8
    In my case I only deleted Xcode Caches. And my Simulator was reborn. Commented Feb 8 at 18:25
  • 1
    This might help momentarilary, but I expect the issue would recur as soon as the shared cache is recreated and before it is scanned. The issue should resolve itself after waiting a few minutes for the system to scan the shared cache, or you can update to Xcode 15.3 Beta 2 or later which avoids using the dyld shared cache until it has been scanned. Commented Feb 18 at 18:16
  • 1
    This worked for me also in XCode v 15.3. Thanks
    – banditKing
    Commented May 2 at 11:02
  • 1
    Deleting just Xcode Caches, simulator started working again.
    – ChampChris
    Commented May 10 at 10:02
67

I fixed this by opening Xcode, then Xcode -> Settings -> Platforms. For me iOS 17.0 was not downloaded. After downloading and restarting my computer, the Simulator launched again.

8
  • 1
    Both iOS 16 and 17 runtimes didn't work for me, interestingly iOS 15 works! No ideas what's going on and probably wait for the fix from Apple
    – tmhao2005
    Commented Oct 12, 2023 at 3:12
  • 5
    This worked for me. I didn't even need to restart. (MacBook Pro M1 Max)
    – Todd
    Commented Oct 22, 2023 at 12:47
  • 5
    Worked like a charm, no restart. Commented Oct 31, 2023 at 20:39
  • 5
    That fixed it. It's absolutely shocking that apple would release an update that is so broken with no error, but thank you!
    – NickJ
    Commented Nov 6, 2023 at 1:00
  • 2
    I had iOS 17 installed, but it worked after reinstalling it. This answer inspired the "reinstallation". Thanks @Walter Commented Nov 15, 2023 at 9:10
24

Deleting simulator cache from terminal using rm -r ~/Library/Developer/CoreSimulator/Caches worked for me.

3
  • 2
    Thanks, this worked for me with Xcode 15.3 + iOS 17.4 Commented May 6 at 20:01
  • I tried this solution and it worked for me, thanks
    – A.Matt
    Commented Jun 24 at 15:17
  • This for me as well.
    – CyberMew
    Commented yesterday
19

I was facing the same issue I solved it by going to "About this Mac -> Storage -> Manage -> Developer" then by deleting Xcode cache. After that I was able to run my app in simulator.

4
  • @Hassy Have you tried the solution which I gave? Commented Mar 13 at 8:25
  • 1
    Yes I did deleted the Xcode cache and it worked.
    – Hassy
    Commented Mar 13 at 10:27
  • This solved my issue after deleting almost everything related to simulator and adding it up again. Thank zou so much! Commented Mar 19 at 21:38
  • This solution worked for me. I just deleted Xcode caches and simulator started working after Xcode restart. I am using XCode 14.2 downloaded from web in Monterey OS. Commented Jun 6 at 13:30
8

I had the same issue and error log.

What worked for me was:

  1. Go to ~/Library/Developer/CoreSimulator
  2. Delete all folders inside.
  3. When you now run a simulator, it will say it's not found/missing (since we deleted them).
  4. Go to manage run destinations, delete the simulator(in my case it was iPhone 13, iOS 15), click a plus sign, name your new simulator and add a new one. voilá! now you can use the new one for running the app.
8
  • I did try this way too and it didn't work in case of iOS 16 & 17 anyway
    – tmhao2005
    Commented Oct 3, 2023 at 8:07
  • This worked for me specially the last part. Go to managed run Destinations and try adding a new simulator using plus sign. Thanks Commented Oct 24, 2023 at 11:54
  • Just Installed Xcode 15.2 and same thing happened to me as above. This worked for me.
    – malaki1974
    Commented Jan 9 at 17:01
  • Where can you find "manage run destinations"? @malaki1974 Commented Jan 9 at 17:48
  • 1
    @gb992 You can find it by clicking on the simulator name in the center top of xcode, and on the bottom of that list you'll find Manage run destinations! Hope that helps.
    – victorgson
    Commented Jan 10 at 18:25
7

Just run this in the terminal:

xcrun simctl shutdown all && xcrun simctl erase all

to reset the iPhone Simulator

2
0

I guess you have destroyed the integration of the simulators, but you don’t need to do something with the Xcode cause they are separated totally.

Solution

  1. Open your Xcode
  2. Manage Run Destination.
  3. Find simulators matched your Identifier and delete it.
  4. Create a new simulator with the same deviceType and OS Version.
  5. Now you are able to boot it with a new identifier.
7
  • I did this way many times and even tried with fastlane way to recreate new devices but no luck in the end
    – tmhao2005
    Commented Sep 26, 2023 at 9:58
  • @tmhao2005 Did you give the simulator permission to run in the Mac's Security & Privacy Settings ?
    – Elevo
    Commented Sep 26, 2023 at 10:15
  • Does not work for me as well. At least my mac does not crash anymore now. I deleted all derived data, everything in Developer (global and user) reinstalled my OSX (no clean install though), reinstaleld xcode and simulators... and still... Xcode 14 and iOS 16 Simulators work fine, but not iOS 17 Commented Sep 26, 2023 at 11:48
  • @Elevo I'm not sure how to do that?
    – tmhao2005
    Commented Sep 26, 2023 at 13:12
  • @tmhao2005 You can have a try to delete all iOS platform data and reinstall it. Steps: open Xcode -> Settings -> Platforms -> iOS 17.0(7.56GB in my mac) -> Delete(waiting) -> Get.
    – Elevo
    Commented Sep 27, 2023 at 2:19
0

I had the same case, in my case installing additional old Simulator (it was 16.4 sim runtime) solved the problem. After installing Sim 6.4 and rebooting my mac - voila, suddenly even 17'th Sim started working

7
  • I downloaded both iOS 16 and 17 and none of them worked for me
    – tmhao2005
    Commented Sep 29, 2023 at 15:05
  • Oh good news that it appears to work with older version iOS 15
    – tmhao2005
    Commented Sep 29, 2023 at 16:10
  • 1
    I was trying to run iOS 15 simulator on Xcode 15, and it's still giving me the same error, but mine was slightly different: Unable to boot the simulator. Interrupted system call
    – mārt1cz
    Commented Oct 1, 2023 at 18:34
  • 1
    Same issue here with iOS 15 simulator. Did you find a fix marticztn?
    – victorgson
    Commented Oct 2, 2023 at 9:21
  • 1
    @victorgson nope, still cannot run iOS 15 simulator on Xcode 15.0.1, what about you?
    – mārt1cz
    Commented Oct 26, 2023 at 16:44
0

Here is what worked for me.

I am using Xcode Version 15.0 (15A240d)

I double checked my registered devices under my apple developer account, I somehow had two different UUID's for the same MacBook Pro, so I checked the same one for my current MacBook and erased the wrong one, I quit Xcode and reopened then simulator worked fine.

0

I was having extremely long simluator launch times when I updated to Xcode 15 when it released. Downgrade to Xcode 14 helped, but after installing Sonoma on my MacBook Pro M1, unforunatelly, I was not able to use Xcode 14 anymore. And if you are still on macOS Ventura, my advice is to refrain from updating it so far. At least wait for new fixed versions of Xcode 15 to be released.

But if you don't want to downgrade both your macOS and Xcode, then try to use the next steps. They helped me but simulator does not work as smooth as it used to be.

  1. Download iOS 16.4 simulator and create simulators with that version.
  2. Delete default iOS 17 runtime simulators and recreate them.
  3. Delete derived data (Xcode -> Settings-> Locations -> Derived Data (Click the little arrow) -> Delete the folder)

After these steps I was able to run simultators on my MacBook. But I have to say that the launch time of iOS 17 simulator and the apps takes quite more time, and it is still not very responsive and very laggy. You might also see that sometimes it takes forever to attach/install the app, and during this process simulator gets frozen and unresponsive. Restarting Simulator helps.

Didn't face any major issues using iOS 16.4 sim on Sonoma and Xcode 15, so I definetely recommend to use them now as they are smoother, faster and more responsive.

0

It finally turned out, that in Xcode my User account was logged out, due to a password change I had made on my developer account, and my developer account needed an actualising for the devices after a renewal of my license.

0

open Activity Monitor and remove Xcodedevice and xcodebuild after this open xcode > developer tools>simulators open simulator

0

None of these answers works. After several hours, I found that the simulators are listed in the run menu if I create a new project.

My project is created by cmake. So, I found the problem is the Architecture in the project settings: problematic setting

It should be the 'Standard Architectures (arm64)'. Before, it's 'arm64' only, which is not correct.

After resetting those options to the correct one, the simulators are listed now.

0

What worked for me:

  1. Delete ~/Library/Developer/CoreSimulator folder
  2. Attempt to open emulator to get the horizontal menu options at the top left. Click Device -> Erase All Contents and Settings
  3. Quit simulator afterwards
  4. Reopen simulator
-1

I also got this issue since updating to Xcode 15. When trying to implement Walter's answer above, I found out that adding previous version of simulator (in my case, iOS 15.0) helps to fix the issue, now I can boot my simulator again. Add previous version Simulator by clicking + button on bottom left. No need to restart macbook, can use right away after installing.

Add iOS 15.0 Simulator by clicking + button on bottom left

1
  • Nope I think he missed the iOS 17 runtime and after had downloaded, it worked for him with this version. For us, it appears to work with only iOS 15 runtime at this stage
    – tmhao2005
    Commented Nov 2, 2023 at 7:57
-1

I also had this issue (on Xcode 15.1).

For me the problem was the iOS version of the simulator. In the simulators list, each device was listed twice, once with iOS 17.0.1 and once with iOS 17.2. It only worked when selecting a simulator with iOS 17.2.

-1

In my case, I had to update the MacOS ... It was saying that a Mac system update was available but I was ignoring it. After completing the update the "unable to boot simulator." didn't show - instead the iOS emulator turned up.

Try updating your Mac : )

Not the answer you're looking for? Browse other questions tagged or ask your own question.