Appstore screenshot pipeline

From Xopoko/build-swift-apps · View interactive version

Appstore screenshot pipeline is an AI agent skill from the GitHub repository Xopoko/build-swift-apps. iOS App Store screenshot automation with xcodebuild/simctl capture, AXe plans, Koubou framing, review artifacts, and `asc` upload.

How to use this skill

Skill file

App Store Screenshot Pipeline

Before invoking Apple-only binaries, confirm the execution context is macOS. From Windows or Linux, run those steps in a Mac SSH project or through an already configured remote transport; do not retry missing Apple binaries locally.

Build/run the app, capture deterministic screenshots, frame them, review them, then upload through asc.

Defaults: settings .asc/screenshot.settings.json, plan .asc/screenshots.json, raw ./screenshots/raw, framed ./screenshots/framed, frame device iphone-air, Koubou 0.18.1.

Workflow

  1. Verify the current CLI surface with asc screenshots --help, subcommand help, and axe --version. If axe is missing, install it with brew install cameroncooke/axe/axe or run ./scripts/install-deps.sh --profile screenshots.
  2. Create/update settings with bundle id, project/scheme, UDID, paths, frame_enabled, upload_enabled, and upload target.
  3. Build/install/launch:

```bash

xcrun simctl boot "$UDID" || true

xcodebuild -project "App.xcodeproj" -scheme "App" -configuration Debug \

-destination "platform=iOS Simulator,id=$UDID" -derivedDataPath ".build/DerivedData" build

xcrun simctl install "$UDID" ".build/DerivedData/Build/Products/Debug-iphonesimulator/App.app"

xcrun simctl launch "$UDID" "com.example.app"

```

Use xcodebuild -showBuildSettings if the bundle path differs.

  1. Capture with plan:

```bash

asc screenshots run --plan ".asc/screenshots.json" --udid "$UDID" --output json

```

During plan authoring use AXe primitives: axe describe-ui, axe tap, axe type, axe screenshot.

  1. Frame with pinned Koubou:

```bash

pip install koubou==0.18.1

kou --version

asc screenshots list-frame-devices --output json

asc screenshots frame --input "./screenshots/raw/home.png" --output-dir "./screenshots/framed" --device "iphone-air" --output json

```

If frames are missing, run kou setup-frames once with network access.

  1. Review:

```bash

asc screenshots review-generate --framed-dir "./screenshots/framed" --output-dir "./screenshots/review"

asc screenshots review-open --output-dir "./screenshots/review"

asc screenshots review-approve --all-ready --output-dir "./screenshots/review"

```

  1. Prefer plan/apply for reviewed batches so existing remote screenshots are considered:

```bash

asc screenshots plan --app "APP_ID" --version "1.2.3" --review-output-dir "./screenshots/review" --output json

asc screenshots apply --app "APP_ID" --version "1.2.3" --review-output-dir "./screenshots/review" --confirm --output json

```

Direct upload:

```bash

asc screenshots upload --version-localization "LOC_ID" --path "./screenshots/framed" --device-type "IPHONE_69" --output json

```

Locale Capture

Do not rely on xcrun simctl launch ... -e AppleLanguages; it does not reliably switch app language. Prefer one simulator UDID per locale, set simulator-wide defaults, then capture:

set_simulator_locale() {
  UDID="$1"; LOCALE="$2"; LANG="${LOCALE%%-*}"; APPLE_LOCALE="${LOCALE/-/_}"
  xcrun simctl boot "$UDID" || true
  xcrun simctl spawn "$UDID" defaults write NSGlobalDomain AppleLanguages -array "$LANG"
  xcrun simctl spawn "$UDID" defaults write NSGlobalDomain AppleLocale -string "$APPLE_LOCALE"
}

set_simulator_locale "$UDID" "de-DE"
xcrun simctl terminate "$UDID" "com.example.app" || true
asc screenshots capture --bundle-id "com.example.app" --name "home" --udid "$UDID" --output-dir "./screenshots/raw/de-DE" --output json

For manual launches: xcrun simctl launch "$UDID" "com.example.app" -AppleLanguages "(de)" -AppleLocale "de_DE". Parallelize locales with distinct UDIDs and frame/review after wait.

Rules

Use explicit long flags and JSON for machine steps. Ensure files exist before upload. Treat local screenshot automation as experimental in user-facing notes. Use plan/apply for append-limit guardrails. If framing checks fail, reinstall koubou==0.18.1. Validate with asc screenshots sizes --output table and asc screenshots list --version-localization "LOC_ID" --output table.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.