simulator-workflow
Skill9 starsChanged 6 months agoMITView on GitHub
Build, run, and test iOS apps on simulators. Use when working on simulator build flows, app bundle discovery, simulator resolution, or boot/install/launch logic.
In this repository7 other files it gives its agents.
- cli-developmentSkill
- device-and-uiSkill
- example-projectSkill
- mcp-setupSkill
- swift-agent-debug-logSkill
- tool-handler-developmentSkill
- swift-agent-debug-logSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
After bazel build, search bazel-bin/ using the target label's package path.
- Very specific: line 44
Do not rely on the sim app writing directly to .cursor/debug-*.log on the host
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Simulator Workflow
Build + Run + Launch Chain
The bazel_ios_build_and_run tool chains these steps (each failure short-circuits):
- Build —
bazel build <target> - Find app — search
bazel-bin/using target label's package path - Resolve simulator — priority: explicit UDID > name match > first booted > first available iPhone > first available device
- Boot — lazy, only
simctl bootif state !=Booted - Install —
simctl install <udid> <app_path> - Read bundle ID —
plutil -convert json -o -onInfo.plist(syncexecSync) - Launch —
simctl launch <udid> <bundleId>
App Bundle Discovery
- After
bazel build, searchbazel-bin/using the target label's package path. - Target
//:Foo→bazel-bin/Foo.app,//Apps/Bar:Bar→bazel-bin/Apps/Bar/Bar.app. rules_appleplaces bundles inside<target>_archive-root/Payload/—findAppBundlesearches recursively.
Simulator Resolution
resolveSimulator returns { device: SimulatorDevice; warning?: string }:
warningis set when the resolved simulator is not the explicitly requested one (fallback).resolveSimulatorFromArgsinhelpers.tsis the convenience wrapper — returns{ sim, warning }.prependWarning(message, warning)prepends the warning to tool output.
Launch Environment Variables
Env vars are passed via SIMCTL_CHILD_* prefix convention — simctl forwards them to the launched process.
For Cursor DEBUG MODE (NDJSON hypothesis logs), use the swift-agent-debug-log skill and bazel_ios_agent_debug_* tools:
AGENT_DEBUG_LOG_PATH/AGENT_DEBUG_SESSION_IDvialaunchEnvonbuild_and_runoragent_debug_repro- Simulator fallback:
Documents/agent-debug.ndjson+bazel_ios_agent_debug_log_pull - Do not rely on the sim app writing directly to
.cursor/debug-*.logon the host
Platform CPU Flags
| Platform | Flag |
| iOS simulator | --ios_multi_cpus=sim_arm64 |
| iOS device | --ios_multi_cpus=arm64 |
| macOS | (none — host arch) |
| tvOS | --tvos_cpus=sim_arm64 |
| watchOS | --watchos_cpus=arm64 |
| visionOS | --visionos_cpus=sim_arm64 |
Platform Discovery Queries
Uses rules_apple rule names: ios_application, macos_application, tvos_application, watchos_application, visionos_application (and *_unit_test variants).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

