How to Fix iOS Simulator Not Starting
In this tutorial, you'll learn about How to Fix iOS Simulator Not Starting. We cover key concepts, practical examples, and best practices.
The Problem
You click Run in Xcode and the simulator shows a black screen or never launches:
Simulator unable to boot: Domain: NSPOSIXErrorDomain, Code: 60
"Simulator connection became invalid"
Or the simulator opens but stays frozen on the Apple logo.
Quick Fix
Step 1: Force quit and restart the simulator
killall Simulator
open -a Simulator
This kills the simulator process and launches a fresh instance.
Step 2: Erase all content and settings
In the Simulator app: Device > Erase All Content and Settings.
Or via terminal:
xcrun simctl erase all
Expected:
Erased all contents and settings of all devices.
Step 3: Shut down all simulators
xcrun simctl shutdown all
Sometimes a simulator is stuck in a "booting" state. Shutting down all devices allows a clean restart.
Step 4: Check available runtimes
xcrun simctl list runtimes
Expected:
iOS 17.4 (17.4 - 21F79) - Available
If a runtime is marked as "Unavailable," download it in Xcode: Settings > Platforms > + or download a simulator from the Components tab.
Step 5: Clear derived data
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Step 6: Restart CoreSimulator service
sudo killall -9 com.apple.CoreSimulator
sudo launchctl reboot userspace
This fully restarts the CoreSimulator framework that manages simulator lifecycles.
Step 7: Check disk space
df -h /
The simulator needs at least 10 GB of free disk space. If space is low, clear caches:
xcrun simctl delete unavailable
rm -rf ~/Library/Developer/CoreSimulator/Caches/*
Step 8: Create a new simulator device
xcrun simctl create "iPhone 16 Pro" "iPhone 16 Pro" "iOS18.0"
Creating a fresh device from the command line bypasses any corrupted device settings.
Prevention
- Always shut down simulators from the menu (Cmd+Q) rather than force-quitting.
- Maintain at least 20 GB of free disk space for simulator operations.
- Run
xcrun simctl delete unavailableperiodically to remove stale devices.
Common Mistakes with simulator not starting
- Using
returnto exit a function early instead of wrapping a pure value in the monad - Mixing let bindings with <- bindings in do notation, producing type errors
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
These mistakes appear frequently in real-world IOS code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
DodaTech Tool Reference
Doda Browser's Device Manager provides a UI for managing simulator devices, runtimes, and paired watches, complementing Xcode's device management.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro