# IOS Simulator

Manages iOS Simulator devices and app tests with xcrun simctl: lifecycle...

- Repository: https://github.com/dpearson2699/swift-ios-skills (1266 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-07-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dpearson2699/swift-ios-skills --skill ios-simulator -g -a claude-code -y`
Codex: `npx skills add dpearson2699/swift-ios-skills --skill ios-simulator -g -a codex -y`
Cursor: `npx skills add dpearson2699/swift-ios-skills --skill ios-simulator -g -a cursor -y`
Gemini CLI: `npx skills add dpearson2699/swift-ios-skills --skill ios-simulator -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add dpearson2699/swift-ios-skills`

## Description

Manages iOS Simulator devices and app tests with xcrun simctl: lifecycle, install/launch, push and location simulation, privacy permissions, deep links, status-bar overrides, screenshots/video, log streaming, app containers, and targetEnvironment(simulator). Use when scripting Simulator workflows, debugging CoreSimulator boot failures, or deciding which hardware, performance, networking, memory-pressure, and security behaviors require a physical device.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# iOS Simulator

Load [the simctl command reference](references/simctl-commands.md) when you need
complete command tables, JSON parsing, privacy/status-bar values, Logger filter
setup, or boot recovery commands.

## Contents

- [Device Lifecycle](#device-lifecycle)
- [App Install and Launch](#app-install-and-launch)
- [Testing Workflows](#testing-workflows)
- [Screenshot and Video Recording](#screenshot-and-video-recording)
- [Log Streaming](#log-streaming)
- [Compile-Time Simulator Detection](#compile-time-simulator-detection)
- [Simulator Limitations](#simulator-limitations)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)

## Device Lifecycle

### Listing Devices and Runtimes

```bash
# List all available simulators grouped by runtime
xcrun simctl list devices available

# List installed runtimes
xcrun simctl list runtimes

# List only booted devices
xcrun simctl list devices booted

# JSON output for scripting
xcrun simctl list -j devices available
```

Parse JSON output to find a specific device programmatically. See [references/simctl-commands.md](references/simctl-commands.md) for `jq` parsing examples.

### Creating a Device

```bash
# Find available device types and runtimes
xcrun simctl list devicetypes
xcrun simctl list runtimes

# Create a device, returns the new UDID
xcrun simctl create "My Test Phone" "iPhone 16 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-18-4"
```

Device types and runtime identifiers in examples throughout this skill are illustrative. Run `simctl list devicetypes` and `simctl list runtimes` to find the identifiers available on your system.

Use the returned UDID for subsequent commands.

### Boot, Shutdown, Erase, Delete

```bash
# Boot a specific device
xcrun simctl boot <UDID>

# Boot if needed and wait until the device is ready
xcrun simctl bootstatus <UDID> -b

# Shutdown a running device
xcrun simctl shutdown <UDID>

The rest: https://github.com/dpearson2699/swift-ios-skills/blob/HEAD/skills/ios-simulator/SKILL.md
