skip to Main Content

I am going a bit crazy recently because I can’t use Xcode and simulators at all! Today I erased my hard drive, installed fresh macOS – Sonoma, installed fresh Xcode 15 from App Store, started a new project and … macBook crashed. I have MacBook Pro 16" M1.
I tried to uninstall Xcode and then install it manually, I tried also to manually add the runtime iOS17 and every time I try to boot and launch simulator – almost instantly crashes. It doesn’t matter if I do it from Xcode or from the terminal. I am running out of ideas and there is nothing on the forums that will solve my issue. I have tried countless workaround and no one works. By the way, SwiftUI preview also crashes.

What I discovered is the CoreSimulator.log file and it says basically that can’t see the runtime iOS at all. Do you know where the runtime for iOS is supposed to be?

I used apple example to add it from the terminal. –

xcode-select -s /Applications/Xcode-beta.app
xcodebuild -runFirstLaunch
xcrun simctl runtime add "~/Downloads/watchOS 9 beta Simulator Runtime.dmg"

This is a part of the CoreSimulator.log file

Sep 27 23:34:59 Vasils-MacBook-Pro CoreSimulatorService[742] <Notice>: com.apple.CoreSimulator.CoreSimulatorService 920.6 starting.
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Notice>: Device Baca's iPhone (8303E065-924D-4E1E-8488-2A4457042532, iOS 17.0, Booted) encountered in unexpected state at launch: Booted.  Shutting down.
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Error>: Unable to load device.plist: /Users/bacata.borisov/Library/Developer/CoreSimulator/Devices/DC8880C0-5D67-4DAA-95B6-75043F690485/device.plist
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Error>: Failed to create device at path /Users/bacata.borisov/Library/Developer/CoreSimulator/Devices/DC8880C0-5D67-4DAA-95B6-75043F690485.
Sep 27 23:35:08 Vasils-MacBook-Pro com.apple.iphonesimulator[576] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Warning>: Found duplicate SDKs for appletvos17.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS17.0.sdk
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Warning>: Found duplicate SDKs for iphoneos17.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Warning>: Found duplicate SDKs for watchos10.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.0.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk
Sep 27 23:35:08 Vasils-MacBook-Pro CoreSimulatorService[742] <Warning>: Unable to locate a suitable watch runtime for phone=iOS 17.0 (17.0 - 21A328) - com.apple.CoreSimulator.SimRuntime.iOS-17-0, wanted watch=(null)
Sep 27 23:35:10 Vasils-MacBook-Pro com.apple.dt.Xcode[548] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:35:10 Vasils-MacBook-Pro com.apple.dt.Xcode[548] <Warning>: Found duplicate SDKs for appletvos17.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS17.0.sdk
Sep 27 23:35:10 Vasils-MacBook-Pro com.apple.dt.Xcode[548] <Warning>: Found duplicate SDKs for iphoneos17.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk
Sep 27 23:35:10 Vasils-MacBook-Pro com.apple.dt.Xcode[548] <Warning>: Found duplicate SDKs for watchos10.0:
        /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS10.0.sdk
        /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk
Sep 27 23:35:30 Vasils-MacBook-Pro com.apple.CoreSimulator.simctl[895] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:35:42 Vasils-MacBook-Pro com.apple.CoreSimulator.simctl[920] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:35:42 Vasils-MacBook-Pro com.apple.CoreSimulator.simctl[920] <Error>: Failed to load liblaunch for runtime com.apple.CoreSimulator.SimRuntime.iOS-17-0: Error Domain=NSPOSIXErrorDomain Code=88 "Malformed Mach-o file" UserInfo={NSLocalizedDescription=Failed to open liblaunch_sim: dlopen(/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib, 0x0101): tried: '/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), NSLocalizedFailureReason=Malformed Mach-o file}
Sep 27 23:35:42 Vasils-MacBook-Pro com.apple.CoreSimulator.simctl[920] <Error>: Failed to setup launchHostClient for runtime com.apple.CoreSimulator.SimRuntime.iOS-17-0: Error Domain=NSPOSIXErrorDomain Code=88 "Malformed Mach-o file" UserInfo={NSLocalizedDescription=Failed to open liblaunch_sim: dlopen(/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib, 0x0101): tried: '/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib' (no such file), NSLocalizedFailureReason=Malformed Mach-o file}
Sep 27 23:35:50 Vasils-MacBook-Pro com.apple.CoreSimulator.simctl[926] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:44:13 Vasils-MacBook-Pro com.apple.dt.xcodebuild[1052] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
Sep 27 23:49:17 Vasils-MacBook-Pro CoreSimulatorService[1013] <Notice>: com.apple.CoreSimulator.CoreSimulatorService 920.6 starting.
Sep 27 23:49:17 Vasils-MacBook-Pro com.apple.dt.Xcode[999] <Warning>: Unable to discover any Simulator runtimes. Developer Directory is /Applications/Xcode.app/Contents/Developer.
:

Could this be somehow related to permissions issues? Thanks in advance for suggestions

2

Answers


  1. Chosen as BEST ANSWER

    As a summary. I spent about two months troubleshooting different software issues and I have tried all suggested solutions to me. After I noticed that my MacBook crashes with other apps and sometimes just crashing by itself, I decided to take it to the local Apple Service where guys ran some diagnostics and it turned out that the motherboard has to be replaced. After replacement I re-installed everything - Xcode from the App Store, and simulator worked like a charm. I still have the same errors in the logs but the difference is that everything is running smooth.

    Luckily my MacBook was under warranty and I had everything replaced for free. If you are still experiencing crashes, I will suggest you to take it to your local Apple Service where they can run diagnostics and let you know if the issues is caused by the software or by the hardware. Thanks a lot for all the suggestions. Topic can be closed now


  2. iPhone 15 pro simulator crashes for me, but iPhone 15 is fine. Try to switch to a different simulator (deleting / creating new won’t work).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search