From che-apple-dev
Debug iPad/iPhone app crashes by deploying with console capture. Use when user says "app crashed", "debug crash", "why did it crash", "閃退", "當掉", or after a deploy-and-test cycle where the app dies. Uses xcrun devicectl --console to capture stdout/stderr including Swift fatal errors, then analyzes the output.
npx claudepluginhub psychquant/psychquant-claude-plugins --plugin che-apple-devThis skill is limited to using the following tools:
Deploy iOS app with console capture to diagnose crashes.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Deploy iOS app with console capture to diagnose crashes.
xcodebuild build -project <proj> -scheme <scheme> -configuration Debug -destination 'generic/platform=iOS' 2>&1 | grep -E '(error:|BUILD)'
xcrun devicectl device install app --device <udid> "<app_path>" 2>&1
This is the key step — --console captures all stdout/stderr:
xcrun devicectl device process launch \
--device <udid> \
--terminate-existing \
--console \
<bundle_id> 2>&1
The command blocks until the app exits. If the app crashes, the output includes:
Fatal error: <message> — Swift runtime errorsApp terminated due to signal N — crash signals (6=SIGABRT, 11=SIGSEGV, 15=SIGTERM)print() output from the appCommon crash patterns:
| Output | Cause | Fix |
|---|---|---|
load from misaligned raw pointer | UnsafeRawPointer.load with unaligned offset | Use byte-by-byte read |
Thread 1: EXC_BAD_ACCESS | Use-after-free or null pointer | Check object lifetime |
signal 9 (SIGKILL) | OOM — system killed for memory | Reduce allocations, check for leaks |
signal 6 (SIGABRT) | Assertion failed | Check guard/precondition |
| No crash output, app just dies | Jetsam (memory) | Check GPU texture allocation |
# Local crash reports
find ~/Library/Logs/DiagnosticReports -name "*<app>*" -type f | xargs ls -t | head -3
# Read latest
head -100 "<latest_crash_log>"
Show: