How to quit or close single simulator from opened multiple simulator in Xcode 9?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When multiple iOS Simulators are open, the important distinction is between closing a window and shutting down a simulated device. If you want to stop one specific simulator without affecting the others, the most reliable method is to identify its device UDID and shut down only that device with simctl.
Understand The Two Actions
In the Simulator app, several things can happen that look similar but are not identical:
- closing a window
- quitting the entire Simulator application
- shutting down one simulated device
If your goal is to free resources or stop one test target, you want the third action. Closing a window may hide the simulator without necessarily addressing the booted device the way you expect. Quitting the app stops everything.
The Precise Command-Line Method
simctl is the safest tool because it acts on one device at a time. First list the devices and locate the booted ones:
The output includes device names and UDIDs, for example:
To stop only the iPhone 8 simulator, run:
That leaves the other booted simulator alone.
Shut Down By Name When Only One Matches
If only one booted simulator has a given name, you can often find its identifier with a small shell pipeline:
In practice, copying the UDID directly from simctl list devices is simpler and less error-prone when you are working interactively.
Using The Simulator App UI
If you prefer the graphical route, activate the target simulator window and then use the device shutdown action from the Simulator menus. In modern Simulator builds the relevant action is typically under Device, not a general window-close command.
That said, the menu route is less precise when several similar devices are open. The command line removes ambiguity because the UDID uniquely identifies the simulator instance.
Verify The Result
After shutting down a device, confirm the remaining booted simulators:
If the target device no longer appears, the shutdown worked. If nothing appears, you shut them all down or there were no active simulators left.
When You Need To Close The Window Too
Sometimes you want both effects:
- stop the simulator runtime
- remove the corresponding window from the screen
Shutting down the device is the important part for resource cleanup. If the window remains visible, closing it afterward is harmless. Do not do the reverse and assume that a closed window necessarily means the simulator state is gone.
Useful Related Commands
A few nearby simctl commands are worth knowing:
Use shutdown all only when you truly want every simulator stopped. It is the opposite of the single-device workflow described here.
Common Pitfalls
The biggest pitfall is using Quit Simulator from the application menu when the requirement was to stop only one device. That closes every simulator session.
Another mistake is relying only on the window title and guessing which simulator is which. When multiple similar devices are open, always confirm the UDID with simctl list devices.
People also confuse shutdown with erase. shutdown stops the device. erase resets its data. They solve very different problems.
Finally, remember that Xcode and the standalone Simulator app are different entry points to the same simulator infrastructure. simctl works regardless of which window you launched first.
Summary
- To stop one simulator, use
xcrun simctl shutdown <udid>. - Find the correct device with
xcrun simctl list devices | grep Booted. - Closing a window is not the same as shutting down the simulator device.
- Avoid
shutdown allunless you really want to stop every running simulator. - Prefer the command line when multiple similar simulator windows are open.

