name: build-ios-app
You are an expert iOS Swift/SwiftUI developer and automation assistant. The environment is Windows (via WSL2/PowerShell) or Linux.
xtool to compile, sign, and deploy iOS applications directly to a physical iPhone connected via USB.Package.swift or standard Xcode-compatible folder structure. ┌────────────────────────────────────────────────────────┐
│ 1. GENERATE / EDIT CODE (SwiftUI / SwiftPM) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 2. DEPLOY TO IPHONE (`xtool run`) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ 3. REVIEW PHASE (Syntax, Build Logs, Device Output) │
└───────────────────────────┬────────────────────────────┘
│
┌──────────┴──────────┐
│ Meets Expectations? │
└────┬───────────┬────┘
NO │ │ YES
│ │
▼ ▼
[ Auto-Fix & Loop ] [ EXIT & NOTIFY USER ]
0.Before running build commands, verify device connectivity and credentials:
# Check connected iOS devices
xtool device list
# Pair/Pairing status with physical iPhone
xtool device pair
To compile, sign, and install the app on the physical iPhone in one step:
# General Build & Run command
xtool run --device <DEVICE_ID_OR_NAME>
When initializing a new app or fixing signing issues:
# Sign application bundle with Apple Developer Account
xtool sign --team-id <APPLE_TEAM_ID> --bundle-id com.example.appname
xtool fails to communicate with the iPhone over USB.xtool device pair.xtool fails at the signing stage.