Can't download iOS runtime in Xcode 15.3

I just upgraded my Macbook & Xcode installation, as we are required to target the latest iOS SDK later this month.

I am now unable to compile our app as the iOS runtime is not installed by default. I have tried to download the missing runtime by clicking on "iOS 17.4 Not Installed - Get" in the top title bar. I think that the initial download may have been interrupted. Now, when I click "Get", I get a popup that suggests that I can't download the Runtime because the iOS Simulator is already installed.

I'm guessing that Xcode is holding a reference to a non-existent installation somewhere, but I can't figure out how to get rid of it.

I have tried completely uninstalling Xcode, and deleting /Library/Developer from both my personal directory and the system directory. I can't delete the iOS Simulator installation reference from Xcode directly either. When I try to, I get this error message:

Unable to remove SimulatorRuntime
Domain: com.apple.DVTFoundation
Code: -1
User Info: {
    DVTErrorCreationDateKey = "2024-04-13 14:18:22 +0000";
}
--
Unable to remove SimulatorRuntime
Domain: com.apple.DVTFoundation
Code: -1
--
Cannot stage disk image or bundle for delete: 87947E69-C049-4950-B663-C40C3BCAAFB2
Domain: com.apple.CoreSimulator.simdiskimaged.SimDiskImageError
Code: 18
--
The file “87947E69-C049-4950-B663-C40C3BCAAFB2.dmg” doesn’t exist.
Domain: NSCocoaErrorDomain
Code: 4
Failure Reason: The file doesn’t exist.
--
The operation couldn’t be completed. No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
--


System Information

macOS Version 14.4.1 (Build 23E224)
Xcode 15.3 (22618) (Build 15E204a)
Timestamp: 2024-04-13T16:18:22+02:00

Replies

I was able to solve this by :

  1. in Xcode Settings / Platforms - right click over iOS 17.4 Simulator and choose "Delete"

  2. Closing Xcode

  3. going to https://developer.apple.com/download/all/?q=Xcode and downloading iOS_17.4_Simulator_Runtime.dmg

  4. Installing it from terminal by going to the directory where the dmg was downloaded and running the following command :

xcrun simctl runtime add ./iOS_17.4_Simulator_Runtime.dmg

  1. Running Xcode again, everything was working fine now.
  • This worked for me but is very inconvenient, I wonder how long it'll take them to fix this issue? Thanks for direction

Add a Comment

Faster than using xcrun if you don't need to.

In xcode

  1. Go to Settings->Platforms
  2. Delete the iOS 17.4 simulators currently installed
  3. Install the one that has "GET" next to it

I'm not sure what has caused this issue, but it seems to be on Apple's side. If I had to guess it's something with how they handle registration of the installed simulators. I've run into it on both my old personal intel mac and my M2 mac at work this week, we've also run into it on our build machines.

  • I did all this then after several reboots of my laptop, still had to go into Activity Monitor to quit launchd_sim in order to get it to actually start launching again.

Add a Comment

I saw this while kicking the same issue. I rebooted my MacBook and it looked right again. I don't know why and when this happens. I don't know if this is any reference, but I hit the same issue while developing it as a React Native.