iosxcode

Xcode 16.2 fails to build project with `Failed to launch AssetCatalogSimulatorAgent via CoreSimulator spawn` and similar errors


I have an issue with my Mac MINI as it have stopped compiling my projects recently. I have no idea why it happened recently, but everything was OK until I have tried to modify a xib/storyboard file in a project.

It is unable to compile storyboard nor asset catalogs because it can't seem to find any simulators to compile it in. There are several errors that it can produce:

No available simulator runtimes for platform iphonesimulator. SimServiceContext supportedRuntimes=[]
Failed to launch AssetCatalogSimulatorAgent via CoreSimulator spawn
iOS 18.2 Platform not installed

When I go into Settings > Components, I can see iOS 18.2 is installed. If I remove it, I can click get (after restarting the window), however when clicked it shows: Initializing (registering download) for some time, then immediately jumps to 8.71GB installed Repeating this will eventually really download the package (ie. shows progress and uses network), but it still doesn't install correctly (apparently).

I have also tried downloading an iOS_18.2_Simulator_Runtime.dmg from Apple developer downloads page, but that does not seem to do anything either - When opened, it is being verified, once verified, the window just disappears and Mac says Disk not ejected properly - Eject "iOS 18.2 Simulator Bundle" before disconnecting or turning it off.

I have tried restarting Xcode, restarting Mac, reinstalling Xcode, killing the simulator processes (sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService), renaming the ~/Library/Developer directory, creating a brand new user on Mac, nothing seem to help. I have also tried downloading some beta versions of Xcode 16.2, I believe I had beta 2 installed, but that did not help either.

Steps to reproduce:

  1. created a new user on the Mac MINI,
  2. In that user: downloaded up-to-date Xcode from the AppStore (App Store requires login, so that one is the same as on the other account),
  3. created a brand new project (App),
  4. added an image to the existing Assets catalog in the project,
  5. changed the target device to simulator (to keep the process fast as device requires to copy debugging symbols; xcode can't deploy the build binary as the simulator is missing) and set up Signing (signing also requires login, so that one is the same as on the other account)
  6. clicked build.

I have mac mini: macOS 15.3.1, M1 2020, xcode 16.2; iPhone (Xr) 18.3 and iPad (6th gen) 17.7.2.

I have seen Failed to launch IBCocoaTouchImageCatalogTool via CoreSimulator spawn, Failed to launch AssetCatalogSimulatorAgent via CoreSimulator spawn (Xcode) and similar questions, tried the answers, but those did not help either.


Solution

  • It's not really a fix for the issues above, but after trying many things, I've resorted to reinstalling the mac os.

    The system actually needed to be 'Transfer or Reset'ed (in Mac Menu > Settings > General), normal reinstall did not help.