| name | ios-manage-simulators |
| description | Create, delete, and manage iOS Simulator devices using xcrun simctl. Use when the user wants to create a simulator, delete a simulator, list simulators, reset a simulator, clone a device, rename a device, or manage simulator lifecycle (boot, shutdown, erase). |
iOS Simulator Management
All commands use xcrun simctl. The <device> argument accepts a UDID or the special string booted (picks one booted device).
Discovery
List devices, device types, and runtimes
xcrun simctl list devices
xcrun simctl list devicetypes
xcrun simctl list runtimes
xcrun simctl list devices --json
Find a device UDID by name
xcrun simctl list devices | grep "iPhone 17 Pro"
Naming Convention
Derive the simulator name from the git remote so devices are project-scoped:
PROJECT=$(git remote get-url origin | sed 's/.*\///' | sed 's/\.git$//')
Use $PROJECT as the device name in all create/clone commands below.
Create
PROJECT=$(git remote get-url origin | sed 's/.*\///' | sed 's/\.git$//')
xcrun simctl create "$PROJECT" "iPhone 17 Pro" "iOS 26.2"
xcrun simctl create "$PROJECT" \
com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro \
com.apple.CoreSimulator.SimRuntime.iOS-26-2
Returns the new device UDID on success. Capture it:
PROJECT=$(git remote get-url origin | sed 's/.*\///' | sed 's/\.git$//')
UDID=$(xcrun simctl create "$PROJECT" "iPhone 17 Pro" "iOS 26.2")
echo "Created: $UDID"
Clone
xcrun simctl clone "iPhone 17 Pro" "iPhone 17 Pro Clone"
xcrun simctl clone <UDID> "Cloned Device"
Clones an existing device including its data. Returns the new UDID.
Rename
xcrun simctl rename booted "My Renamed Device"
xcrun simctl rename <UDID> "New Name"
Lifecycle
Boot and shutdown
xcrun simctl boot <device>
xcrun simctl shutdown <device>
xcrun simctl shutdown all
Open Simulator.app (shows booted device)
open -a Simulator
Boot + open in one go
xcrun simctl boot "iPhone 17 Pro" 2>/dev/null; open -a Simulator
Reset (Erase)
Wipes all content and settings, returning the device to a clean state. Device must be shut down first.
xcrun simctl shutdown <device> 2>/dev/null
xcrun simctl erase <device>
xcrun simctl erase all
Delete
xcrun simctl delete <device>
xcrun simctl delete unavailable
xcrun simctl delete all
Important: A device must be shut down before it can be deleted. Shut it down first:
xcrun simctl shutdown <device> 2>/dev/null
xcrun simctl delete <device>
App Operations (bonus)
xcrun simctl install booted /path/to/App.app
xcrun simctl launch booted com.example.MyApp
xcrun simctl uninstall booted com.example.MyApp
xcrun simctl terminate booted com.example.MyApp
Common Recipes
Create a fresh device, boot it, and open Simulator
PROJECT=$(git remote get-url origin | sed 's/.*\///' | sed 's/\.git$//')
UDID=$(xcrun simctl create "$PROJECT" "iPhone 17 Pro" "iOS 26.2")
xcrun simctl boot "$UDID"
open -a Simulator
Tear down a device completely
xcrun simctl shutdown <device> 2>/dev/null
xcrun simctl delete <device>
Clean up unavailable/stale simulators
xcrun simctl delete unavailable
Reset a device to factory state without deleting
xcrun simctl shutdown <device> 2>/dev/null
xcrun simctl erase <device>
xcrun simctl boot <device>