When you start, stop, reset, or run an app in Xcode Simulator, you may see the message “The operation couldn’t be completed”. This is a generic Simulator failure rather than a single specific error. Common causes include an inconsistent CoreSimulator state, corrupted simulator data, unavailable devices, a damaged runtime, an incorrect active Xcode path, or insufficient disk space. This guide walks through practical checks and fixes in a safe order.
- What the error means
- Common causes
- Typical situations where it appears
- Checks to perform first
- Fix 1: Restart Xcode and Simulator
- Fix 2: Shut down all simulators
- Fix 3: Erase the affected simulator
- Fix 4: Remove unavailable simulator devices
- Fix 5: Reinstall the Simulator runtime
- Fix 6: Correct the Command Line Tools path
- Fix 7: Clear DerivedData for project-specific failures
- If the error still occurs
- Summary
What the error means
The operation couldn’t be completed.
The message itself does not identify the root cause. More useful details may appear immediately after it, in Xcode’s Report navigator, in Console, or in Terminal output. If an error code or additional CoreSimulator message is present, use that information first.
Common causes
- Simulator or the CoreSimulator service is temporarily stuck
- The selected simulator device data is corrupted
- Old or unavailable simulator devices remain after an Xcode or runtime update
- The installed Simulator runtime is incomplete or damaged
- Command Line Tools are pointing to a different Xcode installation
- The Mac is low on free storage
- Simulator state from an older Xcode version remains after an update
Typical situations where it appears
This problem is especially common after updating Xcode or macOS, switching between multiple Xcode versions, deleting old Simulator runtimes, repeatedly booting and shutting down devices, or repeatedly installing and launching an app during development.
Checks to perform first
1. List available simulator devices
xcrun simctl list devices
Check whether the target device is marked as Shutdown, Booted, or unavailable. If many unavailable devices remain, clean them up later using simctl delete unavailable.
2. Verify the active Xcode installation
xcode-select -p
xcodebuild -version
If multiple Xcode versions are installed, Terminal may be using a different developer directory from the Xcode app you currently have open.
3. Check available storage
Simulator runtimes and individual device data can consume a large amount of disk space. Low free space can cause boot, installation, reset, and runtime operations to fail. Check macOS System Settings → General → Storage and make sure the system has enough free space.
Fix 1: Restart Xcode and Simulator
Quit both Xcode and Simulator, reopen Xcode, and try again. A temporary CoreSimulator state problem may disappear after a clean restart. If the issue remains, restart the Mac as well.
Fix 2: Shut down all simulators
xcrun simctl shutdown all
Apple includes simctl with Xcode for managing Simulator devices. The shutdown all command stops every running simulator. After it completes, launch the target Simulator again from Xcode.
Fix 3: Erase the affected simulator
If the error occurs only on one simulator, its device data may be corrupted. You can erase it from Xcode’s Devices and Simulators window or identify its UDID and use Terminal:
xcrun simctl list devices
xcrun simctl shutdown <UDID>
xcrun simctl erase <UDID>
Important: Erasing a simulator removes installed apps, settings, and test data from that simulated device. Make sure you do not need anything stored there before continuing.
Fix 4: Remove unavailable simulator devices
After removing runtimes or upgrading Xcode, stale devices may remain in the CoreSimulator database. Remove only devices whose runtimes are no longer available:
xcrun simctl delete unavailable
Restart Xcode afterward and create a fresh simulator if necessary.
Fix 5: Reinstall the Simulator runtime
If the problem affects only one iOS runtime version, that runtime may be incomplete or corrupted. Open Xcode Settings and use the Components or Platforms section, depending on your Xcode version, to remove and redownload the required Simulator runtime. Use a runtime supported by your installed Xcode version.
Fix 6: Correct the Command Line Tools path
If multiple copies of Xcode are installed, point the command-line developer directory to the Xcode you intend to use. For a standard installation at /Applications/Xcode.app:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcode-select -p
Then restart Xcode and Simulator.
Fix 7: Clear DerivedData for project-specific failures
If Simulator works normally with other projects, stale build data may be involved. Remove the affected project’s DerivedData and rebuild. To clear all DerivedData from Terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Note: This command removes DerivedData for every Xcode project. If you only want to reset one project, delete only that project’s corresponding DerivedData directory.
If the error still occurs
Because “The operation couldn’t be completed” is generic, inspect the full error details in Xcode’s Report navigator and macOS Console, especially messages containing CoreSimulator, launchd, runtime, or device identifiers. Also verify that the Xcode version, macOS version, and selected Simulator runtime are mutually supported. When using beta software, matching compatible beta versions is particularly important.
Summary
For Xcode Simulator’s “The operation couldn’t be completed” error, work through the problem in this order: restart Xcode and Simulator → shut down all simulators → erase the affected simulator → remove unavailable devices → reinstall the runtime → verify xcode-select. If only one project is affected, also clear its DerivedData. Any accompanying error code or detailed message should take priority because it can identify the actual failing component.
