Skip to content
Agent Orchestration
Skill

/ios-rebuild-dev

Rebuild TermioMobile and install + relaunch it on the connected iPhone (or the booted simulator with 'sim'), pointed at this Mac's companion server. Invoke when the user says 'rebuild ios', 'rebuild the iphone app', 'run on my phone', 'preview on iphone', 'ios rebuild', '重新编译

From plugin
termio
66429 skills

Claude Code

$ npx -y skills add termio-sh/termio --skill ios-rebuild-dev --agent claude-code

SKILL.md

ios-rebuild-dev.SKILL.md
name: ios-rebuild-dev
description: "Rebuild TermioMobile and install + relaunch it on the connected iPhone (or the booted simulator with 'sim'), pointed at this Mac's companion server. Invoke when the user says 'rebuild ios', 'rebuild the iphone app', 'run on my phone', 'preview on iphone', 'ios rebuild', '重新编译 ios', or '装到手机上'."

Rebuild iOS App (local development)

Build `TermioMobile`, install it on the user's iPhone, and relaunch it connected to this Mac's companion server — the iOS equivalent of `macos-rebuild-dev`.

Everything is already scripted in `ios/dev-run.sh`: it finds the first connected iPhone via `xctrace`, builds Debug with `xcodebuild` (automatic provisioning, derived data in `ios/build/`), installs with `devicectl`, and launches `sh.termio.mobile` with `-roster-url ws://<this Mac's en0 IP>:8787` so the app talks to the companion server in the running Mac termio. `--terminate-existing` kills the previous instance, so rerunning the script IS the edit-preview loop.

Instructions

When invoked, execute these steps sequentially:

1. **Decide the target.** Default is a physical iPhone. If the user said "sim"/"simulator" (or no iPhone is reachable and they agree to fall back), use the simulator path in step 4 instead.

2. **Run the dev script** from the repo root. Show the tail of the output; on build failure show the error and **stop — do NOT install/launch**:

   ./ios/dev-run.sh 2>&1 | tail -20

Pass a custom roster URL through as `./ios/dev-run.sh ws://host:8787` only if the user asked for one.

3. **Triage the common failures** instead of retrying blindly:

  • *"No iPhone found"* — the phone must be plugged in (or Wi-Fi paired) and

have trusted this Mac. Show the `xcrun xctrace list devices` output the script printed and ask the user to connect/trust, or offer the simulator.

  • *Provisioning/signing errors* — the first device build needs Xcode signed

into the personal team; tell the user to open `ios/TermioMobile.xcodeproj` once in Xcode and fix Signing & Capabilities, don't try to edit the pbxproj.

  • *Install OK but launch fails / app crashes on open* — iOS 16+ needs

**Developer Mode** on (Settings ▸ Privacy & Security ▸ Developer Mode), and the developer certificate must be trusted (Settings ▸ General ▸ VPN & Device Management).

  • *App launches but shows no sessions* — the Mac termio app must be running

(companion server on :8787) and the phone on the same network. Offer to run the `macos-rebuild-dev` skill to (re)start the Mac app.

4. **Simulator fallback** (only when asked or when no device is available). Pick the booted simulator if one exists, otherwise the first available iPhone from `xcrun simctl list devices available`:

   cd ios
   SIM=$(xcrun simctl list devices available | grep -m1 'iPhone.*Booted' \
       | sed -E 's/.*\(([0-9A-F-]+)\).*/\1/')
   [[ -n "$SIM" ]] || SIM=$(xcrun simctl list devices available | grep -m1 'iPhone' \
       | sed -E 's/.*\(([0-9A-F-]+)\).*/\1/')
   xcodebuild -project TermioMobile.xcodeproj -scheme TermioMobile \
       -configuration Debug -destination "platform=iOS Simulator,id=${SIM}" \
       -derivedDataPath build build 2>&1 | tail -12
   xcrun simctl boot "$SIM" 2>/dev/null || true
   open -a Simulator
   xcrun simctl install "$SIM" build/Build/Products/Debug-iphonesimulator/TermioMobile.app
   # The companion server refuses unauthenticated sockets after a 10s grace
   # window, so the roster URL MUST carry the pairing token (?t=…) or the app
   # loops "connected → unauthorized → reconnect" forever. Token lives in the
   # Mac app's defaults (readable by design), same as dev-run.sh.
   TOKEN=$(defaults read sh.termio.app companion.pairingToken 2>/dev/null || true)
   xcrun simctl launch --terminate-running-process "$SIM" sh.termio.mobile \
       -roster-url "ws://127.0.0.1:8787${TOKEN:+/?t=${TOKEN}}"

In the simulator the Mac is `127.0.0.1`, not the en0 IP. Remember: simulator UserDefaults overrides only work via launch arguments, not `simctl defaults write` (see the `ios-sim-defaults` memory).

5. **Report** the result: device (name/UDID) or simulator, build outcome, and whether the app launched. If it built and launched, remind the user the app is pointed at `ws://<Mac IP>:8787` and needs the Mac termio app running.

Notes

  • Device builds require the iPhone unlocked during install; `devicectl` errors

out on a locked passcode-protected phone.

  • The script builds **Debug** — fine for previewing; there is no separate

release/bundle step like the Mac app's icon dance.

  • Do NOT modify `ios/dev-run.sh` or the pbxproj as part of a rebuild.
  • After a UI change lands on the simulator, screenshots can be taken with

`xcrun simctl io booted screenshot /tmp/ios.png`; on a physical phone, ask the user for a screenshot instead.

Read more
@termio-sh
Ships withtermio

A terminal-first agentic development environment for agentic coding. Build for CLI/TUI agent. Runtime for Coding Agent, Tmux alternative

Stars on GitHub

Momentum

stars in total
664
Star history of termio-sh/termio on GitHub, a chart by star-history.com

Other skills on termio.

termio-device

termio-device

See and drive the sibling agent sessions running alongside you on this machine via the `termio session` CLI — list them and their…

@termio-sh@termio-shInstall Skill
termio

termio

See and drive the sibling agent sessions running alongside you in this Termio project via the `termio session` CLI — list and…

@termio-sh@termio-shInstall Skill
animation-vocabulary

animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing…

@termio-sh@termio-shInstall Skill
app-screenshot-debug

app-screenshot-debug

Drive the running termio app via AppleScript / System Events to reach a UI state (focus the window, click a sidebar project, a…

@termio-sh@termio-shInstall Skill
apple-design

apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing…

@termio-sh@termio-shInstall Skill
asc

asc

Drive App Store Connect from the terminal with the `asc` CLI — TestFlight builds, groups, testers and What to Test notes; App…

@termio-sh@termio-shInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw7d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca5d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip6d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about ios-rebuild-dev.

Which coding agents can use ios-rebuild-dev?
ios-rebuild-dev installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.