skills/ios/run-simulator/SKILL.md
Build, install, launch, and screenshot an iOS app in the Simulator to verify a change visually. Use when the user wants to run the app, see a change live, screenshot the running app, or confirm a UI fix actually works (not just that it compiles).
npx skillsauth add rshankras/claude-code-apple-skills run-simulatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Launches the actual app in the iOS Simulator and drives it far enough to see what a user would see. Building proves the code compiles; this skill proves it runs. The payoff is a screenshot of the live app that you read back to confirm the change — a blank or crashed frame is a failure, not a pass.
This skill is generic. Nothing about a specific app is hardcoded — the scheme, simulator, product path, and bundle id are all discovered at runtime.
Use this skill when the user:
Do not use it for unit/UI test runs (xcodebuild test) — that's a different
goal. This is about meeting the app as a user would.
Run the steps in order. Each step's output feeds the next, so don't hardcode values a previous step can discover.
Prefer a workspace over a bare project when both exist (CocoaPods/SPM setups often require the workspace):
# Find the container
ls *.xcworkspace 2>/dev/null || ls *.xcodeproj 2>/dev/null
# List schemes (use -workspace X.xcworkspace OR -project X.xcodeproj)
xcodebuild -list -project <App>.xcodeproj 2>/dev/null
Pick the app scheme (usually matches the app name). If several schemes look plausible and none clearly matches, ask the user which to run rather than guessing.
Never hardcode a device name — the named device may not exist on this Mac (e.g. assuming "iPhone 16" when only "iPhone 17 Pro" is installed fails with "Unable to find a device matching the provided destination specifier"). List what's actually available and prefer one already booted:
# Already-booted sim, if any (fastest — skip the boot wait)
xcrun simctl list devices booted
# Otherwise, available iPhones to choose from
xcrun simctl list devices available | grep -i iphone
Choose a booted device if present; otherwise pick a recent iPhone from the available list and remember its name for the destination string.
xcodebuild build \
-project <App>.xcodeproj \
-scheme <Scheme> \
-destination 'platform=iOS Simulator,name=<SimName>' \
2>&1 | tail -5
** BUILD SUCCEEDED **. Note that -quiet suppresses
that success line, so either drop -quiet for the confirming run or grep for
error: explicitly.error: lines — don't proceed to install a stale or
nonexistent build..app and its bundle idDon't guess the DerivedData path — ask the build system for it:
# Product directory + name from the resolved build settings
eval $(xcodebuild -project <App>.xcodeproj -scheme <Scheme> \
-destination 'platform=iOS Simulator,name=<SimName>' \
-showBuildSettings 2>/dev/null \
| awk -F' = ' '/ TARGET_BUILD_DIR =/{print "DIR=\""$2"\""} / FULL_PRODUCT_NAME =/{print "NAME=\""$2"\""}')
APP="$DIR/$NAME"
echo "APP: $APP"
# Bundle id straight from the built Info.plist
BID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$APP/Info.plist")
echo "Bundle id: $BID"
SIM="<SimName>"
xcrun simctl boot "$SIM" 2>/dev/null # no-op if already booted
open -a Simulator # bring the window forward
xcrun simctl bootstatus "$SIM" -b # block until fully booted
xcrun simctl install "$SIM" "$APP"
xcrun simctl launch "$SIM" "$BID"
simctl launch prints <bundleid>: <pid> on success. A non-zero exit or an
error string here means the app failed to start — investigate before
screenshotting.
xcrun simctl io "$SIM" screenshot /tmp/sim-shot.png
Then Read /tmp/sim-shot.png and actually look at it:
If the change lives behind navigation, drive there before judging. Tap by point or describe to the user what to navigate to:
# Tap a point (x y in points) — useful for hitting a known tab/button
xcrun simctl io "$SIM" tap <x> <y> # (where supported)
# Re-screenshot after each interaction
xcrun simctl io "$SIM" screenshot /tmp/sim-shot-2.png
For deep links, xcrun simctl openurl "$SIM" "<scheme>://<path>". If precise
tapping isn't available, take the screenshot at the landing screen and tell the
user the exact taps to reach the target view.
Report, concisely:
xcrun simctl uninstall "$SIM" "$BID" then reinstall; or xcrun simctl shutdown "$SIM" && xcrun simctl erase "$SIM" for a clean slate (destroys sim data — confirm first).-workspace <App>.xcworkspace instead of -project.simctl bootstatus -b blocks correctly; a fixed
sleep does not and races the install.xcrun simctl help — full simulator control surface (boot, install, launch,
io, openurl, spawn).man xcodebuild — build, -list, -showBuildSettings, -destination.development
US web checkout via the StoreKit External Purchase Link entitlement — currently 0% Apple commission (litigation ongoing), how to ship it safely, and how to architect for a commission flip so a future ruling is a config change, not a rewrite. Use when adding external purchase links, weighing web checkout vs IAP, or planning US-storefront pricing strategy.
tools
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School & Business Manager. Use when a developer has multiple apps, a subscription worth sharing, complementary indie partners, or school/clinic/business buyers.
testing
Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.
tools
Stage-by-stage audit of an app's App Store growth machinery against a 54-item P0–P9 playbook — every item scored from an App Store Connect MCP call, a codebase check, or an explicit question to the user, then routed to the skill or command that fixes it. Read-only on App Store Connect. Use for a growth audit or scorecard, a pre-launch growth plan, a quarterly re-audit, or "which growth levers am I missing."