Launch iOS simulator from Xcode and getting a black screen, followed by Xcode hanging and unable to stop tasks
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
A black iOS Simulator window followed by Xcode hanging usually means the simulator runtime, project build state, or CoreSimulator services are stuck. The symptom looks like one problem, but there are several different failure modes underneath it. The quickest path is to separate simulator-state issues from project-specific issues and reset only what is actually broken.
Start by Deciding Whether the Simulator or the Project Is Broken
First, test the simulator independently of your app.
If the simulator itself boots and shows the Home screen, the black screen may be triggered by your app, its launch sequence, or the Xcode build state. If the simulator cannot boot cleanly even without the app, the issue is lower-level simulator state.
Reset the Simulator Cleanly
Corrupted simulator state is one of the most common causes.
What these do:
- '
shutdown allpowers off booted devices' - '
erase allresets device contents and settings' - killing
SimulatorandCoreSimulatorServiceforces the runtime services to restart
After that, launch a fresh simulator and try again.
Clear Xcode Build Artifacts
If the simulator is healthy but the app launch still hangs, clear derived build output.
Then reopen Xcode, rebuild, and run again. Stale derived data can produce odd runtime behavior, especially after SDK upgrades, renamed targets, or simulator runtime changes.
Check for a Stuck App Launch
A black screen can also mean the app launched but blocked its own main thread immediately. For example:
- synchronous network work on startup
- a deadlock in
AppDelegateorSceneDelegate - a SwiftUI view stuck in an expensive initialization path
- a breakpoint or debugger pause that is easy to miss
A minimal example of what not to do on the main thread:
If something like that happens during app startup, the simulator window may appear but never render usable UI.
Check Runtime and Toolchain Compatibility
Simulator failures become more common after updating Xcode without matching the installed simulator runtimes or after switching between Xcode versions.
Look in Xcode under Settings -> Platforms and confirm the expected iOS runtime is installed. If you keep multiple Xcode versions, make sure the active developer directory is the one you intend:
If this points to an unexpected Xcode bundle, simulator behavior can become inconsistent.
When Xcode Cannot Stop the Task
If Xcode says it cannot stop the running task, the launched process or simulator service may be stuck beyond the normal IDE controls. In that case, killing the relevant processes is faster than waiting.
Then reopen Xcode and rerun. This is blunt, but effective when the IDE and simulator stop talking to each other correctly.
A Fast Isolation Workflow
Use this order so you do not reset more than necessary:
- boot a simulator without your app
- erase and restart simulator services if the device is black
- clear derived data if the simulator works but app launch hangs
- inspect your app startup path for main-thread blocking or deadlocks
- verify the active Xcode version and installed runtimes
That isolates environment issues from app bugs quickly.
Common Pitfalls
The biggest mistake is assuming the black screen proves the simulator is broken. Many times the app itself is hanging during launch.
Another mistake is deleting random files before trying simctl resets. The simulator tools already provide a cleaner recovery path.
A third issue is switching between multiple Xcode installs and forgetting that xcode-select may still point at the wrong developer directory.
Summary
- A black-screen simulator plus a hung Xcode session can come from simulator state, build artifacts, or app startup bugs
- Use
simctlto test and reset the simulator independently of the project - Clear
DerivedDatawhen the simulator is fine but the built app still hangs - Inspect startup code for main-thread blocking and deadlocks
- If Xcode cannot stop the task, restart
Simulator,CoreSimulatorService, and Xcode itself

