Detects missing or insufficient in-app account deletion functionality required since June 30, 2022 under Guideline 5.1.1(v) for all apps that support account creation.
日本語の概要は準備中です。原文の説明を表示しています。
Detects force unwraps, force casts, force try, and other crash-prone Swift patterns that can cause unrecoverable crashes during App Store review, violating Guideline 2.1.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Detects force unwraps, force casts, force try, and other crash-prone Swift patterns that can cause unrecoverable crashes during App Store review, violating Guideline 2.1.
references/guidelines/2-performance.mdCase: Force unwrap crash on nil response — reviewer hit edge case with test data — rejected under 2.1 Source: Apple Developer Forums (multiple threads on crash-related rejections) Root cause: Force unwrap (!) causes EXC_BAD_INSTRUCTION crash at review time on edge-case data — reviewers use test accounts and synthetic data that may produce nil where the developer did not expect it
Case: Force cast as! crash when server returned unexpected type — reviewer triggered during review
Source: Developer blogs
Root cause: Casting without nil check produces unrecoverable crash — reviewers will encounter this on any data type mismatch between the server and the app's model layer
Invoke on any iOS/macOS Swift project before App Store submission to identify high-risk crash patterns.
| Name | Type | Default | Description |
|---|---|---|---|
project_root | path | cwd | iOS/macOS project root |
shared_context | object | nil | Pre-collected context from appstore-full-audit Phase 1 |
Skip this phase if shared_context is provided.
Glob **/*.swift — collect all Swift source files.Glob **/*.m — collect Objective-C source files.Force unwrap
Run multiple Grep patterns in **/*.swift to catch all force-unwrap variants:
[a-zA-Z0-9_]!\.[a-zA-Z] — force unwrap before property/method access (value!.property)[a-zA-Z0-9_]! — force unwrap before space (let x = value! )[a-zA-Z0-9_]!, — force unwrap in argument list (foo(value!, other))[a-zA-Z0-9_]!\) — force unwrap inside parentheses (foo(value!))[a-zA-Z0-9_]!\] — force unwrap before subscript (arr[value!])[a-zA-Z0-9_]!$ — force unwrap at end of line (let x = dict["key"]!)
Each match that is not in a test target or a SwiftUI #Preview block → 🔴 CRITICAL per occurrence. Replace with if let, guard let, or ?? fallback.Force cast
Grep pattern as! in **/*.swift.
Each match not in a test file → 🔴 CRITICAL. Replace with as? and appropriate nil handling.
Force try
Grep pattern try! in **/*.swift.
Each match not in a test file → 🔴 CRITICAL. Replace with do { try ... } catch { } or try?.
fatalError in non-exhaustive contexts
Grep pattern fatalError\( in **/*.swift.
For each match, Read surrounding context — if used inside a switch for enum exhaustiveness or in required init(coder:) boilerplate stubs, flag → 🟠 HIGH. Any fatalError reachable at runtime on valid user input is a crash risk.
UI updates on background thread
Grep pattern DispatchQueue\.main\.async|DispatchQueue\.main\.sync in **/*.swift — check for their absence near UI updates.
Also Grep for UILabel\.text\s*=|UIImageView\.image\s*=|tableView\.reloadData|collectionView\.reloadData — if these appear outside a DispatchQueue.main block, flag → 🟠 HIGH. Background thread UI mutations cause runtime crashes that are difficult to reproduce but may surface during review.
Collect all findings from Phase 2 and build the prioritised findings list below. Include file paths and line numbers. Omit tiers with no findings.
## Crash Risk Audit — Findings
### 🔴 CRITICAL — Guaranteed rejection
- [ ] TODO: Replace force unwrap with guard let or if let — crash risk on nil value — `NetworkManager.swift:45` — Guideline 2.1
- [ ] TODO: Replace `as! UserModel` with `as? UserModel` and handle nil — force cast crash risk — `FeedViewController.swift:112` — Guideline 2.1
- [ ] TODO: Replace try! with do-catch or try? — unhandled error will crash — `DatabaseManager.swift:88` — Guideline 2.1
### 🟠 HIGH — Very likely rejection
- [ ] TODO: Wrap fatalError in required init(coder:) stub with assertionFailure or a logged fallback — `CustomView.swift:22` — Guideline 2.1
- [ ] TODO: Move UILabel.text update inside DispatchQueue.main.async — UI mutation on background thread detected — `DataViewModel.swift:67`
### 🟡 MEDIUM — Possible rejection
- [ ] TODO: Audit remaining fatalError calls to verify they cannot be reached on valid user data paths
### 🟢 LOW — Best practice
- [ ] TODO: Enable Swift strict concurrency checking (SWIFT_STRICT_CONCURRENCY = complete) to catch actor-isolation violations before submission
Glob, Grep, Read
shared_context is provided by orchestrating agent.Run these in your project root to check manually:
# Count force unwraps (!)
!grep -rn " as! \|try!" . --include="*.swift" | grep -v "//\|fatalError" | wc -l
# List force casts (review each one)
!grep -rn " as! " . --include="*.swift" | grep -v "//"
# Check for force try
!grep -rn "try!" . --include="*.swift" | grep -v "//"
# Check for fatalError usage
!grep -rn "fatalError\(" . --include="*.swift" | grep -v "//"
examples/swift/QualityPatterns.swift
Find target files
**/*.swift (exclude *Tests*, *Spec*, *Mock* paths)Search for rejection patterns
\w![.(] — force unwrap (value!.property, value!() — avoids != false positives\bas!\b — force cast\btry!\b — force tryfatalError\|preconditionFailure — unconditional crash (flag in non-test files)\.reloadData()\|\.reloadSections\|beginUpdates — check surrounding context for DispatchQueue.mainDetermine verdict
DispatchQueue.main → 🔴 CRITICALfatalError reachable from normal user flow → 🟠 HIGHReport
value! with guard let value = value else { return } or if let; wrap UI updates in DispatchQueue.main.async { }まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Detects missing or insufficient in-app account deletion functionality required since June 30, 2022 under Guideline 5.1.1(v) for all apps that support account creation.
日本語の概要は準備中です。原文の説明を表示しています。
Detects feature patterns that require a higher age rating than commonly submitted, enforcing Guideline 2.3.6 which requires age ratings to accurately reflect the app's content and social features.
日本語の概要は準備中です。原文の説明を表示しています。
Detects apps that send user data to third-party AI systems without explicit in-app consent and disclosure, enforcing Guideline 5.1.2(i).
日本語の概要は準備中です。原文の説明を表示しています。
Detects placeholder content, stub UI, hardcoded test credentials, and non-production endpoints that signal an incomplete app to reviewers under Guideline 2.1.
日本語の概要は準備中です。原文の説明を表示しています。
Detects app name violations including names exceeding 30 characters, beta labels, Apple trademark terms, and version numbers in the display name, enforcing Guideline 2.3.7.
日本語の概要は準備中です。原文の説明を表示しています。
App Store rejection prevention for iOS/macOS apps. Covers privacy, UGC, IAP, metadata, layout, and quality checks based on real Apple rejection cases.
日本語の概要は準備中です。原文の説明を表示しています。