appstore-precheck 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,148 @@
3
3
  All notable changes to this project are documented here. Versioning follows
4
4
  [SemVer](https://semver.org/). Released as git tags.
5
5
 
6
- ## [Unreleased]
6
+ ## [1.14.0] - 2026-07-23
7
+
8
+ ### Added
9
+ - **§42 `permission-priming-cta` (catalog vector 43, 5.1.1(iv))**: static scan for custom
10
+ pre-permission ("priming") screens whose consent CTA steers users toward granting access
11
+ ("Allow and continue", "Grant access to start", bare "Enable notifications" buttons).
12
+ Signal-gated on real permission-request APIs; scans String Catalog source-language values
13
+ AND hardcoded Swift/ObjC literals; excludes post-denial "Enable X in Settings" guidance
14
+ (Apple's own recommended pattern) and code comments. Driven by a real July 2026 App Review
15
+ rejection of a GREEN-verdict app — the exact wording "Allow and continue" was rejected under
16
+ 5.1.1(iv) with Apple asking for "Continue"/"Next" (see `corpus/outcomes/ledger.json`,
17
+ first `missed` record). Fixture: `tests/fixtures/permission-priming-app`.
18
+ - **Pierre deep-review check 21 (Tier A, 5.1.1(iv))**: pre-permission priming CTA neutrality —
19
+ the semantic companion to scan §42 (is the flagged string really on a consent gate; does the
20
+ flow stay usable on decline). Former checks 21–28 renumbered 22–29; Tier B set is now
21
+ 4, 5, 7, 10, 15, 29. Totals: 43 scan vectors, 29 deep-review checks (23 Tier A + 6 Tier B).
22
+ - **First real App Store outcome recorded**: `corpus/outcomes/ledger.json` seeds its first
23
+ `missed` record (the 5.1.1(iv) rejection above) — the recall gap that motivated vector 43.
24
+ - **§43 `paywall-trial-emphasis` (catalog vector 44, 3.1.2)**: flags paywall purchase CTAs that
25
+ promote the free trial over the billed price ("Continue with free trial", "Start your free
26
+ trial") and the "free-trial toggle" paywall pattern — the early-2026 App Review rejection wave
27
+ under 3.1.2 (the field-proven fix is a neutral "Continue"/"Subscribe" CTA with the price and
28
+ renewal term legible next to it). Signal-gated on IAP signals; scans String Catalog
29
+ source-language values + hardcoded literals; a CTA that already carries a price is excluded.
30
+ Fixture: `tests/fixtures/trial-cta-paywall-app`.
31
+ - **§44 `metadata-pricing-language` (catalog vector 45, 2.3.1)**: flags "Free", "% off", "sale",
32
+ "discount", or currency amounts in `name.txt`/`subtitle.txt` (2.3.1/2.3.7 accurate metadata) —
33
+ the offline complement to `fastlane precheck`'s pricing rules, which need ASC credentials.
34
+ Hyphen compounds ("ad-free") excluded; keywords/descriptions not scanned. Fixture:
35
+ `tests/fixtures/promo-metadata-app`.
36
+ - **§45 `generic-purpose-string` (catalog vector 46, 5.1.1(ii))**: flags non-empty
37
+ `NS*UsageDescription` values that are very short or pure permission-restating boilerplate
38
+ ("This app needs camera access") — vector 2 checks presence, this checks substance; the static
39
+ complement to deep-review check 18. Fixture: `tests/fixtures/generic-purpose-app`.
40
+ - **§46 `ai-provider-consent` (catalog vector 47, 5.1.1)**: an external AI endpoint/SDK
41
+ (OpenAI, Anthropic, Gemini, Mistral, OpenRouter, Groq, Perplexity, Together) with no
42
+ user-facing string naming the provider — the 2026 consent-screen requirement for sharing user
43
+ data with third-party AI (5.1.1 / 5.1.2(i)). The endpoint URL literal itself does not count
44
+ as a mention. Fixture: `tests/fixtures/ai-chat-app`.
45
+ - **§47 `paywall-urgency` (catalog vector 48, 3.1.2)**: fake-urgency purchase pressure —
46
+ "limited time" / "only today" / "last chance" copy (multilingual) and countdown timers
47
+ combined with discount wording in paywall views (3.1.2 / 2.3.1). Fixture:
48
+ `tests/fixtures/urgency-paywall-app`.
49
+ - **§48 `rating-sentiment-gate` (catalog vector 49, 5.6.1)**: "Enjoying the app?"-style
50
+ sentiment pre-filtering next to a rating-prompt API — routing only happy users to the review
51
+ sheet is rating manipulation. Fixture: `tests/fixtures/rating-gate-app`.
52
+ - **§49 `forced-login` (catalog vector 50, 5.1.1(v))**: a credential login UI with no
53
+ skip/guest/continue-without-account affordance (WARN-verify heuristic). Fixture:
54
+ `tests/fixtures/forced-login-app`.
55
+ - **§50 `push-marketing-optout` (catalog vector 51, 4.5.4)**: a marketing-push SDK (OneSignal,
56
+ Braze, CleverTap, Iterable, Airship, MoEngage) registering for notifications without a
57
+ notification-preferences/opt-out signal. Fixture: `tests/fixtures/push-marketing-app`.
58
+ - **§51 `xcode-sdk-requirement` (catalog vector 52, 2.1)**: `LastUpgradeCheck` clearly pre-26
59
+ vs the April 2026 iOS 26 SDK (Xcode 26) upload minimum (WARN-verify heuristic — the field
60
+ tracks the upgrade-check, not the build toolchain). Fixture: `tests/fixtures/old-xcode-app`.
61
+ - **Multilingual steering/trial patterns for vectors 43–44**: the permission-priming (§42) and
62
+ trial-CTA (§43) regexes now also match common Turkish/German/French/Spanish wording in both
63
+ word orders ("İzin ver ve devam et", "Ücretsiz denemeyi başlat", "Kostenlos testen") — a
64
+ non-English source language is no longer a blind spot for these checks.
65
+ - **Pre-submit manual checklist extended** with the ASC-side items the scanner cannot see:
66
+ exact paywall↔ASC price match, trial configured as an Introductory Offer, the updated
67
+ age-rating questionnaire (13+/16+/18+), EU DSA trader status, and the AI-consent screen.
68
+ Totals: 52 scan vectors.
69
+
70
+ ### Fixed
71
+ - **Version lockstep**: `package.json` and both plugin manifests were left at 1.13.1 when
72
+ SKILL.md moved to 1.14.0 (`scripts/check-versions.sh` was failing); all four now agree.
73
+ - **Last-section fingerprint churn (guideline drift)**: `gd_section_text` ran to end-of-page
74
+ for the last numbered section (5.6.4), gluing the "After You Submit" block, the
75
+ "last updated" date, and the whole site footer onto its prose — so ANY footer edit fired a
76
+ false "5.6.4 text drift" WARN (exactly what happened on 2026-07-23; the actual 5.6.4 prose
77
+ was unchanged). Extraction now truncates at those page-chrome markers; fingerprints
78
+ reconciled (only 5.6.4's hash changed).
79
+ - **`--reconcile` wrote a literal placeholder date**: `reconciled_on` was set to the string
80
+ `"RECONCILE_DATE"` instead of today's date (single-quoted jq program); now `--arg`-injected.
81
+ - **README drift from the vector-43 commit**: the static-scan table was missing the
82
+ 5.1.1(iv) permission-priming row, the deep-review table was missing check 21 (priming CTA
83
+ neutrality), and the Tier A count still read 22 (should be 23).
84
+
85
+ ### Added (eval, dev-only — not part of the distributed package)
86
+ - **RAG-grounded Pierre experiment**: `eval/rag/` — ingests the full App Store Review
87
+ Guidelines text (all ~125 sections, not just the officially-mapped subset), embeds it
88
+ (Gemini `gemini-embedding-001`, MRL-truncated to 1024 dims), stores it in a local pgvector
89
+ instance, and retrieves top-k relevant sections to ground Pierre's eval-harness prompt
90
+ (`eval/run.sh --rag`, `eval/lib/build_request.py --retrieved`). Measured against the
91
+ existing 21-case labeled dataset: grounded and ungrounded runs scored identically
92
+ (F1 1.00 on both, all tiers) — a ceiling effect, not a broken pipeline (retrieval was
93
+ independently confirmed to surface the correct guideline section per case). See
94
+ `docs/rag-eval-results.md` and `docs/specs/2026-07-17-rag-grounded-pierre-eval-design.md`.
95
+
96
+ ### Fixed (eval, dev-only)
97
+ - **Gemini embedding requests now actually apply `taskType`/`outputDimensionality`**: the
98
+ request builders nested both fields inside an `embedContentConfig` object, which the v1beta
99
+ REST endpoint silently ignores (the documented curl examples put them at the top level) —
100
+ the published 2026-07-17 run therefore used embeddings without
101
+ `RETRIEVAL_DOCUMENT`/`RETRIEVAL_QUERY` task optimization, and the API's 3072-dim responses
102
+ were only tamed by the client-side MRL truncation safety net. Fields moved to the top level;
103
+ results doc amended (conclusion unchanged — both configurations were at the F1 ceiling).
104
+ - **RAG corpus deliberately not committed**: `eval/rag/corpus/sections.json` (full Apple
105
+ guideline prose) is now gitignored with the copyright rationale documented in
106
+ `eval/rag/README.md`; the design spec's "this file is committed" line is amended.
107
+ - **RAG CLI/network edge cases hardened** (dev-only): `retrieve.py` malformed args exit 64
108
+ with a usage message instead of a traceback; a bare network failure (no HTTP response) in
109
+ the shared Gemini client raises a clear error instead of an unhandled traceback; `run.sh
110
+ --rag` no longer leaks its temp request file when retrieval fails.
111
+
112
+ ### Added (eval, dev-only — not part of the distributed package)
113
+ - **Two guideline-drift-sensitive check-16 (4.8) cases** — the follow-up proposed in
114
+ `docs/rag-eval-results.md`: `check16-eid-login-exempt` (sole eID/BankID login — exempt under
115
+ the *current* 4.8 wording, likely flagged by stale parametric memory; the first case where
116
+ grounded and ungrounded runs may genuinely diverge) and `check16-google-login-only` (clear
117
+ violation under any wording; control twin). Both `label_confirmed: false` (UNLABELED,
118
+ excluded from all metrics) pending human label review; first eval coverage for check 16.
119
+ Labels human-confirmed 2026-07-18.
120
+ - **23-case RAG re-run — first measured divergence**: both configurations re-run with
121
+ task-typed embeddings on the expanded dataset. F1 still 1.00 everywhere (ceiling), but
122
+ consistency split 0.96 vs 1.00 — the single non-unanimous case was exactly the
123
+ drift-sensitive `check16-eid-login-exempt` (ungrounded: `pass/pass/not-applicable` wording
124
+ drift; grounded: unanimous `pass`, citing the retrieved 4.8 exemption, top-1 similarity
125
+ 0.76). A consistency effect, not an accuracy effect — documented with scope caveats in
126
+ `docs/rag-eval-results.md`.
127
+
128
+ ## [1.13.1] - 2026-07-12
129
+
130
+ ### Fixed
131
+ - **Pierre pass-vs-not-applicable boundary**: the deep-review output format now states
132
+ explicitly that "not applicable" is only for checks whose subject matter is entirely
133
+ absent from the project; material that exists and is clean gets a plain `REVIEW-PASS`
134
+ with evidence. Found by the eval consistency metric (3 of 63 clean-case verdicts drifted
135
+ across Opus 4.8 and Fable 5); verified fixed by full re-runs of all three models —
136
+ consistency 1.00 across the board, with no regression on genuine not-applicable cases.
137
+
138
+ ### Added (eval)
139
+ - **Multi-model scorecard**: `docs/llm-scorecard.md` now opens with a comparison table and
140
+ renders every committed baseline (currently Sonnet 5, Opus 4.8, and Fable 5 — before and
141
+ after the prompt clarification); the CI Tier-A F1 floor gates each baseline separately.
142
+ - **Always-on-thinking model support**: `eval/run.sh --model claude-fable-5` works — the
143
+ request omits the `thinking` field for Fable/Mythos-tier models and raises `max_tokens`
144
+ for thinking headroom, both recorded in the manifest.
145
+ - **Prompt fingerprint + stricter resume**: every run manifest records a `prompt_sha256` of
146
+ `pierre-deep-review.md`, and the resume guard refuses to reuse a cache dir produced with
147
+ a different model or a different (or unrecorded) prompt version.
7
148
 
8
149
  ## [1.13.0] - 2026-07-12
9
150
 
package/README.md CHANGED
@@ -16,8 +16,8 @@
16
16
 
17
17
  `appstore-precheck` is a read-only, pre-submission gate for iOS apps. It statically scans the most
18
18
  common rejection vectors, runs Apple's own metadata linter, watches the App Store Review Guidelines
19
- for drift, has Pierre explain every FAIL and WARN, then runs **28 semantic deep-review checks**
20
- (22 high-confidence Tier A + 6 heuristic Tier B v1 — beta language, review notes quality, app preview,
19
+ for drift, has Pierre explain every FAIL and WARN, then runs **29 semantic deep-review checks**
20
+ (23 high-confidence Tier A + 6 heuristic Tier B v1 — beta language, review notes quality, app preview,
21
21
  incentivized review, push/HomeKit abuse, rating manipulation).
22
22
  It hands you a single **GREEN / YELLOW / RED** verdict. It never edits your code.
23
23
 
@@ -31,7 +31,7 @@ by hand or wire it into CI.
31
31
 
32
32
  Your verdict is delivered by **Pierre**, a French critic who has seen ten thousand rejections and is
33
33
  impressed by none of them. He reviews your build harder than Apple would, in private — first with a
34
- fast static scan, then with **28 deep semantic checks** (22 confident + 6 heuristic). A GREEN from
34
+ fast static scan, then with **29 deep semantic checks** (23 confident + 6 heuristic). A GREEN from
35
35
  Pierre means Apple will wave you through.
36
36
 
37
37
  - 🔴 **RED**: *"Non. Restore Purchases, absent. Guideline 3.1.2. Suivant."*
@@ -44,7 +44,7 @@ each, divided by horizontal rules), not one compressed sentence. The breakdown b
44
44
 
45
45
  ## What it checks
46
46
 
47
- 42 rejection vectors across code, fastlane metadata, screenshots, `PrivacyInfo.xcprivacy`, and the paywall:
47
+ 52 rejection vectors across code, fastlane metadata, screenshots, `PrivacyInfo.xcprivacy`, and the paywall:
48
48
 
49
49
  | Guideline | Check |
50
50
  |-----------|-------|
@@ -52,9 +52,11 @@ each, divided by horizontal rules), not one compressed sentence. The breakdown b
52
52
  | **1.6** | App Transport Security disabled app-wide (`NSAllowsArbitraryLoads`) |
53
53
  | **2.1** | No placeholder / dummy copy (lorem ipsum, TODO, `example.com`) in store metadata |
54
54
  | **2.1** | A login-gated app ships demo credentials / review notes for App Review |
55
+ | **2.1** | Project's `LastUpgradeCheck` vs the April 2026 iOS 26 SDK (Xcode 26) upload minimum *(advisory)* |
55
56
  | **2.3** | A working support URL and a privacy URL in fastlane metadata (no placeholders) — also satisfies 1.5 and 5.1.1(i) |
56
57
  | **2.3.1** | Metadata length limits (name, subtitle, keywords, promo, description) |
57
58
  | **2.3.1** | Misleading marketing claims (iOS virus / malware scanners, fake speed boosters) in metadata |
59
+ | **2.3.1** | Pricing / promo language ("Free", "% off", a currency amount) in the app name or subtitle |
58
60
  | **2.3.3** | At least one screenshot per locale |
59
61
  | **2.3.3** | Screenshot format + PNG dimensions match a known App Store screenshot size *(advisory, WARN-only)* |
60
62
  | **2.3.7** | Localized metadata parity across every locale |
@@ -67,18 +69,25 @@ each, divided by horizontal rules), not one compressed sentence. The breakdown b
67
69
  | **3.1.1(a)** | External purchase link entitlement + disclosure, when external purchase APIs are used |
68
70
  | **3.1.2** | Trial & auto-renew subscription disclosures |
69
71
  | **3.1.2** | Restore Purchases + Terms (EULA) + Privacy Policy on the paywall |
72
+ | **3.1.2** | Trial-emphasized paywall CTA ("Continue with free trial") or a free-trial toggle instead of one clear price |
73
+ | **3.1.2** | Urgency / scarcity dark patterns on the paywall ("only today", countdown + discount) |
70
74
  | **3.1.5(a)** | Cryptocurrency wallet / exchange / mining signal |
71
75
  | **4.2** | Minimum functionality (real navigation) |
72
76
  | **4.2.3** | Thin WKWebView wrapper around a website |
73
77
  | **4.2.7** | Remote-desktop / host-mirroring app |
74
78
  | **4.4.1** | Keyboard extension that requires full access (`RequestsOpenAccess`) |
75
79
  | **4.4.2** | Safari content-blocker / web extension |
80
+ | **4.5.4** | Marketing-push SDK registered for notifications without an in-app opt-out signal |
76
81
  | **4.8** | Sign in with Apple offered when a third-party social login is used |
77
82
  | **4.9** | Recurring Apple Pay (`PKRecurringPaymentRequest`) — verify the renewal / cancel disclosure |
78
83
  | **5.1.1** | A non-empty purpose string for every sensitive framework |
79
84
  | **5.1.1** | Analytics SDK present ↔ `PrivacyInfo.xcprivacy` declares collected data / tracking domains |
80
85
  | **5.1.1** | Privacy Manifest ↔ Required Reason API parity |
86
+ | **5.1.1** | Third-party AI endpoint/SDK without a consent string naming the provider |
87
+ | **5.1.1(ii)** | Generic boilerplate purpose strings ("This app needs camera access") instead of the user-facing reason |
88
+ | **5.1.1(iv)** | Pre-permission priming screens whose consent CTA steers users toward granting ("Allow and continue") |
81
89
  | **5.1.1(v)** | Account creation offered without an in-app account-deletion path |
90
+ | **5.1.1(v)** | Credential login with no guest / skip path (forced login for possibly account-free features) |
82
91
  | **5.1.2** | ATT usage ↔ `NSUserTrackingUsageDescription` |
83
92
  | **5.1.2** | Tracking / IDFA SDK (AdMob, AppLovin, AppsFlyer, Adjust, …) shipped without an ATT prompt |
84
93
  | **5.1.3** | HealthKit data with an iCloud / CloudKit sync path |
@@ -88,19 +97,20 @@ each, divided by horizontal rules), not one compressed sentence. The breakdown b
88
97
  | **5.4** | VPN / NetworkExtension usage (org account + on-screen data disclosure) |
89
98
  | **5.5** | Mobile Device Management (MDM) signal |
90
99
  | **5.6.1** | A custom App Store review prompt instead of the system `requestReview` API |
100
+ | **5.6.1** | Sentiment-gated rating flow ("Enjoying the app?" → only happy users see the prompt) |
91
101
  | **encryption** | `ITSAppUsesNonExemptEncryption` set, so App Store Connect skips the export-compliance question |
92
102
 
93
103
  Paywall checks are skipped automatically when no in-app-purchase signals are present, and the
94
104
  signal-gated advisory checks stay silent unless their triggering signal is found.
95
105
 
96
- ### Pierre deep review (28 semantic checks)
106
+ ### Pierre deep review (29 semantic checks)
97
107
 
98
- After the static scan, Pierre reads your project end-to-end and runs **28 evidence-based checks**
108
+ After the static scan, Pierre reads your project end-to-end and runs **29 evidence-based checks**
99
109
  the grep layer cannot fully judge. These emit advisory `REVIEW-FINDING:` lines (they do **not**
100
110
  change the GREEN/YELLOW/RED verdict). Full procedure:
101
111
  [`references/pierre-deep-review.md`](skills/appstore-precheck/references/pierre-deep-review.md).
102
112
 
103
- **22 checks (Tier A)** are high-confidence cross-reads (privacy policy fetch, claims vs code,
113
+ **23 checks (Tier A)** are high-confidence cross-reads (privacy policy fetch, claims vs code,
104
114
  screenshots, paywall copy). **6 checks (Tier B v1, marked †)** are heuristic — useful pre-submit
105
115
  signals with a higher false-positive rate; Pierre prefers `not applicable` when no signal is present.
106
116
 
@@ -126,6 +136,7 @@ signals with a higher false-positive rate; Pierre prefers `not applicable` when
126
136
  | **5.1.1(ii)** | Purpose strings are specific and tied to a visible feature |
127
137
  | **5.1.1(iii)** | Permissions and SDKs proportionate to the app's stated purpose |
128
138
  | **5.1.1(iv)** | Permission denial handled without forced re-prompt loops |
139
+ | **5.1.1(iv)** | Pre-permission priming CTA is neutral ("Continue"/"Next"), not steering toward granting |
129
140
  | **5.1.2** | ATT prompt, tracking description, privacy policy, and ad SDK usage align |
130
141
  | **5.1.3** | HealthKit data not used for advertising or marketing |
131
142
  | **5.1.4** | Kids-audience signals → parental gate before external links / IAP / account areas |
@@ -135,7 +146,7 @@ signals with a higher false-positive rate; Pierre prefers `not applicable` when
135
146
  | **5.6.2–5.6.3** | Developer identity consistent (app name, support URL content, domains) |
136
147
  | **5.6.1 / 5.6.3** † | Rating / review manipulation dark patterns (withhold features until 5 stars, write-review links without `requestReview`) |
137
148
 
138
- Pierre runs **all 28 every time** and reports each as `REVIEW-PASS:` or `REVIEW-FINDING:`. When the
149
+ Pierre runs **all 29 every time** and reports each as `REVIEW-PASS:` or `REVIEW-FINDING:`. When the
139
150
  static scan already flagged a guideline, the deep check adds semantic context the scanner could not see.
140
151
  † Tier B v1 items are heuristic — treat findings as "verify before submit", not automatic blockers.
141
152
 
@@ -148,7 +159,7 @@ how the app is built:
148
159
 
149
160
  | App type | Coverage |
150
161
  |----------|----------|
151
- | 🟢 **Native Swift / SwiftUI** | **Full.** All 42 vectors apply. |
162
+ | 🟢 **Native Swift / SwiftUI** | **Full.** All 52 vectors apply. |
152
163
  | 🟡 **React Native / Flutter** | Metadata, privacy manifest, screenshots, and export compliance apply in full. The native-source checks (ATT, paywall links, private API, SDK detection, navigation) **under-detect rather than misfire**: that logic lives in JS/Dart, so they stay quiet instead of blocking. |
153
164
 
154
165
  ## Quick start
@@ -313,10 +324,10 @@ nothing is auto-fixed.
313
324
  | Phase | Step |
314
325
  |-------|------|
315
326
  | **0** | **Guideline drift**: diff the live App Store Review Guidelines against a tracked baseline. Never blocks. |
316
- | **1** | **Static scan**: `scan.sh` over the 42 vectors above. |
327
+ | **1** | **Static scan**: `scan.sh` over the 52 vectors above. |
317
328
  | **2** | **`fastlane precheck`**: Apple's own metadata rule engine. |
318
329
  | **3** | **Pierre commentary**: explains **every** FAIL and WARN from Phases 0–2 in 2–3 sentences each. |
319
- | **4** | **Pierre deep review**: 28 semantic checks (22 Tier A + 6 Tier B v1 heuristic), plus 5 screenshot-vision checks when screenshots are present. Advisory only. |
330
+ | **4** | **Pierre deep review**: 29 semantic checks (23 Tier A + 6 Tier B v1 heuristic), plus 5 screenshot-vision checks when screenshots are present. Advisory only. |
320
331
  | **5** | **Verdict**: GREEN / YELLOW / RED from Phases 0–2 counts, plus `.precheck-pass` token the upload guard gates on. |
321
332
  | **6** | *(opt-in, agent mode)* **Local dynamic simulator tier**: launch/paywall/permission smoke checks on a local simulator via Maestro + `xcrun simctl`. Advisory; never changes the verdict. |
322
333
 
@@ -408,7 +419,7 @@ measures the false-positive rate on real, unrelated open-source code. See
408
419
  ## Eval (LLM deep-review scorecard)
409
420
 
410
421
  The static scanner above is measured by `docs/scorecard.md`; Pierre's **LLM deep-review layer**
411
- (28 semantic checks, incl. the 6 heuristic Tier B checks) has its own harness under [`eval/`](eval/)
422
+ (29 semantic checks, incl. the 6 heuristic Tier B checks) has its own harness under [`eval/`](eval/)
412
423
  and its own scorecard, [`docs/llm-scorecard.md`](docs/llm-scorecard.md).
413
424
 
414
425
  - **Dataset** — `eval/dataset/`: one labelled case per file (target check, expected
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appstore-precheck",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Read-only iOS App Store pre-submission check, packaged as a portable Agent Skill with native Claude Code, Cursor, and Codex plugins, plus an npx CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Berkay Turk (https://github.com/berkayturk)",
@@ -25,7 +25,7 @@
25
25
  "scripts": {
26
26
  "test": "bash tests/all.sh",
27
27
  "check-versions": "bash scripts/check-versions.sh",
28
- "lint": "node --check bin/cli.js && bash -n skills/appstore-precheck/scripts/scan.sh && bash -n skills/appstore-precheck/scripts/verdict.sh && bash -n skills/appstore-precheck/scripts/phase2-precheck.sh && bash -n skills/appstore-precheck/scripts/findings.sh && bash -n skills/appstore-precheck/scripts/suppress.sh && bash -n hooks/fastlane-guard.sh && bash -n install.sh && bash -n tests/run.sh && bash -n tests/all.sh && bash -n tests/test-verdict.sh && bash -n tests/test-guard.sh && bash -n tests/test-config.sh && bash -n tests/test-install.sh && bash -n tests/test-phase2.sh && bash -n tests/test-cli.sh && bash -n tests/test-findings.sh && bash -n tests/test-format-json.sh && bash -n tests/test-suppress.sh && bash -n tests/test-scorecard.sh && bash -n scripts/scorecard.sh && bash -n scripts/scorecard-real.sh && bash -n scripts/update-brew-formula.sh && bash -n tests/test-pack.sh && bash -n eval/run.sh && bash -n eval/validate.sh && bash -n tests/test-eval-parse.sh && bash -n tests/test-eval-score.sh"
28
+ "lint": "node --check bin/cli.js && bash -n skills/appstore-precheck/scripts/scan.sh && bash -n skills/appstore-precheck/scripts/verdict.sh && bash -n skills/appstore-precheck/scripts/phase2-precheck.sh && bash -n skills/appstore-precheck/scripts/findings.sh && bash -n skills/appstore-precheck/scripts/suppress.sh && bash -n hooks/fastlane-guard.sh && bash -n install.sh && bash -n tests/run.sh && bash -n tests/all.sh && bash -n tests/test-verdict.sh && bash -n tests/test-guard.sh && bash -n tests/test-config.sh && bash -n tests/test-install.sh && bash -n tests/test-phase2.sh && bash -n tests/test-cli.sh && bash -n tests/test-findings.sh && bash -n tests/test-format-json.sh && bash -n tests/test-suppress.sh && bash -n tests/test-scorecard.sh && bash -n scripts/scorecard.sh && bash -n scripts/scorecard-real.sh && bash -n scripts/update-brew-formula.sh && bash -n tests/test-pack.sh && bash -n eval/run.sh && bash -n eval/validate.sh && bash -n eval/rag/ingest.sh && bash -n tests/test-rag-ingest.sh && bash -n tests/test-rag-embed.sh && bash -n tests/test-rag-gemini-client.sh && bash -n tests/test-rag-retrieve.sh && bash -n tests/test-eval-parse.sh && bash -n tests/test-rag-build-request.sh && bash -n tests/test-rag-run-guard.sh && bash -n tests/test-eval-score.sh"
29
29
  },
30
30
  "keywords": [
31
31
  "ios",
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: appstore-precheck
3
- description: Read-only pre-submission check for an iOS app before App Store review. Scans Swift and Objective-C code, fastlane metadata, screenshots, PrivacyInfo.xcprivacy, and the paywall for 42 rejection vectors, wraps Apple's official `fastlane precheck`, watches for live App Store Review Guideline drift, has Pierre explain every FAIL and WARN, then runs 22 semantic deep-review checks (Tier A) plus 6 heuristic checks (Tier B v1) — 28 total. Emits a GREEN/YELLOW/RED verdict and a `.precheck-pass` token an upload guard can gate on. Use when preparing an iOS App Store submission (before Archive, before "Submit for Review", before TestFlight, or before any `fastlane deliver/pilot/release`), or when the user mentions App Store rejection, app review, or fastlane upload.
3
+ description: Read-only pre-submission check for an iOS app before App Store review. Scans Swift and Objective-C code, fastlane metadata, screenshots, PrivacyInfo.xcprivacy, and the paywall for 52 rejection vectors, wraps Apple's official `fastlane precheck`, watches for live App Store Review Guideline drift, has Pierre explain every FAIL and WARN, then runs 23 semantic deep-review checks (Tier A) plus 6 heuristic checks (Tier B v1) — 29 total. Emits a GREEN/YELLOW/RED verdict and a `.precheck-pass` token an upload guard can gate on. Use when preparing an iOS App Store submission (before Archive, before "Submit for Review", before TestFlight, or before any `fastlane deliver/pilot/release`), or when the user mentions App Store rejection, app review, or fastlane upload.
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Berkay Turk
7
- version: 1.13.0
7
+ version: 1.14.0
8
8
  allowed-tools: Bash Read Grep Glob WebFetch mcp__maestro__list_devices mcp__maestro__run mcp__maestro__inspect_screen mcp__maestro__take_screenshot mcp__maestro__cheat_sheet
9
9
  ---
10
10
 
@@ -13,7 +13,7 @@ allowed-tools: Bash Read Grep Glob WebFetch mcp__maestro__list_devices mcp__maes
13
13
  A one-command gate to run before every iOS App Store submission. It minimizes the risk of
14
14
  rejection by statically scanning the most common rejection vectors, running Apple's own
15
15
  metadata linter, watching for guideline drift, having Pierre explain every FAIL and WARN, and
16
- running 28 semantic deep-review checks (22 Tier A + 6 Tier B v1 heuristic). The deep-review checklist lives in
16
+ running 29 semantic deep-review checks (23 Tier A + 6 Tier B v1 heuristic). The deep-review checklist lives in
17
17
  [`references/pierre-deep-review.md`](references/pierre-deep-review.md).
18
18
 
19
19
  **This skill is read-only.** It never edits code, metadata, or assets. It only reports and
@@ -122,7 +122,7 @@ bash <skill-dir>/scripts/scan.sh
122
122
  bash skills/appstore-precheck/scripts/scan.sh
123
123
  ```
124
124
 
125
- Emits `FAIL:` / `WARN:` / `PASS:` lines covering 42 rejection vectors: Privacy Manifest /
125
+ Emits `FAIL:` / `WARN:` / `PASS:` lines covering 52 rejection vectors: Privacy Manifest /
126
126
  Required Reason API parity (5.1.1), purpose strings (5.1.1), ATT (5.1.2), other-platform mentions
127
127
  (2.3.10), metadata limits (2.3.1), localized parity (2.3.7), screenshots (2.3.3), trial &
128
128
  auto-renew disclosures (3.1.2), Restore/Terms/Privacy links (3.1.2), private API (2.5.1), minimum
@@ -140,8 +140,15 @@ NetworkExtension usage (5.4), a demo account for a login-gated app (2.1), execut
140
140
  (3.1.5(a)), thin WKWebView wrappers (4.2.3), remote-desktop apps (4.2.7), Safari extensions
141
141
  (4.4.2), account creation without in-app deletion (5.1.1(v) Account Sign-In), kids audience with
142
142
  third-party ads/analytics (5.1.4), real-money gambling copy (5.3.4), MDM signals (5.5), and
143
- screenshot format/dimension mismatches (2.3.3). The IAP checks (8–10) are skipped automatically
144
- when no in-app-purchase signals are present, and the signal-gated advisory checks (16–42) stay
143
+ screenshot format/dimension mismatches (2.3.3), permission-priming CTA copy that steers users
144
+ toward granting access (5.1.1(iv)), trial-emphasized paywall CTAs and free-trial toggles (3.1.2),
145
+ pricing/promo language in the app name or subtitle (2.3.1), generic boilerplate purpose
146
+ strings (5.1.1(ii)), a third-party AI endpoint without a provider-naming consent string (5.1.1),
147
+ urgency/scarcity dark patterns on the paywall (3.1.2), sentiment-gated rating prompts (5.6.1),
148
+ forced login without a guest path (5.1.1(v)), a marketing-push SDK without an opt-out signal
149
+ (4.5.4), and a pre-26 Xcode `LastUpgradeCheck` against the April 2026 iOS 26 SDK upload minimum
150
+ (2.1). The IAP checks (8–10) are skipped automatically
151
+ when no in-app-purchase signals are present, and the signal-gated advisory checks (16–52) stay
145
152
  silent unless their triggering signal is found. The
146
153
  full check table is in
147
154
  [`references/methodology.md`](references/methodology.md#phase-1-rejection-vectors).
@@ -229,10 +236,10 @@ Use this prompt verbatim after Phases 0–2 complete, pasting in the collected f
229
236
  > FAILs and zero WARNs, say so briefly in 2–3 sentences. Read-only — never modify files. Write the
230
237
  > explanations in `<USER_LANGUAGE>`.
231
238
 
232
- ### Phase 4: Pierre deep review (28 semantic checks)
239
+ ### Phase 4: Pierre deep review (29 semantic checks)
233
240
 
234
- After Phase 3, Pierre runs the **Review Simulator**: 28 read-only, evidence-based checks the
235
- static scanner cannot fully judge (**22 Tier A** + **6 Tier B v1** heuristic — marked † below).
241
+ After Phase 3, Pierre runs the **Review Simulator**: 29 read-only, evidence-based checks the
242
+ static scanner cannot fully judge (**23 Tier A** + **6 Tier B v1** heuristic — marked † below).
236
243
  The full checklist, per-check procedure, and output format live in
237
244
  [`references/pierre-deep-review.md`](references/pierre-deep-review.md) — read it before starting
238
245
  Phase 4. When screenshots are present, also run the structured screenshot vision review in
@@ -245,13 +252,13 @@ SDK usage, screenshots vs features, and paywall disclosure quality.
245
252
 
246
253
  **Rules (summary):**
247
254
 
248
- - Run **all 28 checks every time** — report each as `REVIEW-PASS:` or `REVIEW-FINDING:` (never skip).
255
+ - Run **all 29 checks every time** — report each as `REVIEW-PASS:` or `REVIEW-FINDING:` (never skip).
249
256
  - `REVIEW-FINDING:` is always **WARN** (advisory). It does **not** change FAIL/WARN counts or the verdict.
250
- - † **Tier B v1** checks (4, 5, 7, 10, 15, 28) are heuristic — use cautious language; prefer not applicable when no signal.
257
+ - † **Tier B v1** checks (4, 5, 7, 10, 15, 29) are heuristic — use cautious language; prefer not applicable when no signal.
251
258
  - When Phase 1 already flagged a guideline, still run the matching deep check and add semantic context.
252
259
  - Cite evidence (`file:line`, metadata path, screenshot name, fetched URL excerpt). Read-only — never edit files.
253
260
 
254
- **The 28 checks (guideline order):**
261
+ **The 29 checks (guideline order):**
255
262
 
256
263
  | # | Guideline | Deep question |
257
264
  |---|-----------|---------------|
@@ -275,23 +282,24 @@ SDK usage, screenshots vs features, and paywall disclosure quality.
275
282
  | 18 | **5.1.1(ii)** | Purpose strings specific and feature-tied? |
276
283
  | 19 | **5.1.1(iii)** | Permissions/SDKs proportionate to app purpose? |
277
284
  | 20 | **5.1.1(iv)** | Permission denial handled without forced loops? |
278
- | 21 | **5.1.2** | ATT, tracking description, policy, and ad SDKs align? |
279
- | 22 | **5.1.3** | HealthKit data not used for ads/marketing? |
280
- | 23 | **5.1.4** | Kids signals → parental gate before links/IAP/account? |
281
- | 24 | **5.4** | VPN → on-screen disclosure copy in UI strings? |
282
- | 25 | **5.2.1–5.2.3** | Obvious trademark/brand misuse in metadata or UI? |
283
- | 26 | **5.3.1–5.3.3** | Contest/sweepstakes copy includes official rules? |
284
- | 27 | **5.6.2–5.6.3** | Developer identity consistent (support URL, domains, app name)? |
285
- | 28 † | **5.6.1 / 5.6.3** | Rating manipulation dark patterns beyond scan §25? |
285
+ | 21 | **5.1.1(iv)** | Pre-permission priming CTA neutral ("Continue"/"Next"), not steering? |
286
+ | 22 | **5.1.2** | ATT, tracking description, policy, and ad SDKs align? |
287
+ | 23 | **5.1.3** | HealthKit data not used for ads/marketing? |
288
+ | 24 | **5.1.4** | Kids signals → parental gate before links/IAP/account? |
289
+ | 25 | **5.4** | VPN → on-screen disclosure copy in UI strings? |
290
+ | 26 | **5.2.1–5.2.3** | Obvious trademark/brand misuse in metadata or UI? |
291
+ | 27 | **5.3.1–5.3.3** | Contest/sweepstakes copy includes official rules? |
292
+ | 28 | **5.6.2–5.6.3** | Developer identity consistent (support URL, domains, app name)? |
293
+ | 29 † | **5.6.1 / 5.6.3** | Rating manipulation dark patterns beyond scan §25? |
286
294
 
287
295
  Use this prompt after Phase 3:
288
296
 
289
- > You are **Pierre**. Phase 3 is done. Now run **Phase 4 deep review**: all 28 checks in
297
+ > You are **Pierre**. Phase 3 is done. Now run **Phase 4 deep review**: all 29 checks in
290
298
  > [`references/pierre-deep-review.md`](references/pierre-deep-review.md), in table order. For each
291
299
  > check emit `REVIEW-PASS:` or `REVIEW-FINDING: <guideline> WARN — …`. For every REVIEW-FINDING,
292
300
  > add `Pierre:` with 2–3 sentences (why Apple cares, what you found, what to fix). Read-only.
293
301
  > Write explanations in `<USER_LANGUAGE>`. Do not change the scan verdict counts. † Tier B checks
294
- > (4, 5, 7, 10, 15, 28): prefer not applicable when no signal; use cautious language when flagging.
302
+ > (4, 5, 7, 10, 15, 29): prefer not applicable when no signal; use cautious language when flagging.
295
303
 
296
304
  ### Phase 5: Consolidation + token
297
305
 
@@ -311,10 +319,10 @@ narrative; verdict.sh just pins the threshold arithmetic. `REVIEW-FINDING` lines
311
319
  from Phase 1 + Phase 0/2 only — Pierre's prose and REVIEW-FINDING lines do not add FAIL/WARN).
312
320
  2. Open with Pierre's **trilingual verdict block** using the required format in [Output contract](#trilingual-verdict-block-required-format) — bold language label + blockquote per language, separated by `---`; never one compressed line.
313
321
  3. Present **Phase 3 commentary** — Pierre's 2–3 sentence explanation for every FAIL and WARN.
314
- 4. Present **Phase 4 deep review** — summary count (`REVIEW-FINDING` vs `REVIEW-PASS` of 28), then
315
- every `REVIEW-FINDING` with Pierre explanation; list `REVIEW-PASS` lines compactly or omit if all 28 passed.
322
+ 4. Present **Phase 4 deep review** — summary count (`REVIEW-FINDING` vs `REVIEW-PASS` of 29), then
323
+ every `REVIEW-FINDING` with Pierre explanation; list `REVIEW-PASS` lines compactly or omit if all 29 passed.
316
324
  The 5 screenshot-vision checks (S1–S5) emit the same `REVIEW-*` prefixes but count as a
317
- **separate "+5 vision checks" sub-block** in the summary, never inside the "of 28" denominator.
325
+ **separate "+5 vision checks" sub-block** in the summary, never inside the "of 29" denominator.
318
326
  5. Present the **machine-faithful** scan output: each `FAIL:`/`WARN:` line verbatim, then for each
319
327
  FAIL a `file:line` reference and a suggested fix (one line each, surgical, not paraphrased).
320
328
  6. State the verdict and token action (example one-liners — each goes in its own language block, not inline):
@@ -225,9 +225,9 @@
225
225
  "snapshot": "5.6.3 discovery fraud participating in the app store requires integrity and a commitment to building and maintaining customer trust. manipulating any element of"
226
226
  },
227
227
  "5.6.4": {
228
- "fingerprint": "2f63efa4160b309b6ef4d1280e3d16a06165676f1421c3c36f6dbe305ca1291a",
228
+ "fingerprint": "e132ce3662d95ac10186c2a0a9b7ee4f3ba60814ac05ad635abbd1cae30c11da",
229
229
  "snapshot": "5.6.4 app quality customers expect the highest quality from the app store, and maintaining high quality content, services, and experiences promotes customer tru"
230
230
  }
231
231
  },
232
- "reconciled_on": "2026-07-02"
232
+ "reconciled_on": "2026-07-23"
233
233
  }
@@ -8,7 +8,7 @@ whole file to run the skill.
8
8
  - [Phase 0: Guideline drift check](#phase-0-guideline-drift-check)
9
9
  - [Phase 1: Rejection vectors](#phase-1-rejection-vectors)
10
10
  - [Phase 3: Pierre explains every finding](#phase-3-pierre-explains-every-finding)
11
- - [Phase 4: Pierre deep review (28 checks)](#phase-4-pierre-deep-review-28-semantic-checks)
11
+ - [Phase 4: Pierre deep review (29 checks)](#phase-4-pierre-deep-review-29-semantic-checks)
12
12
  - [Auto-detection rules](#auto-detection-rules)
13
13
  - [Verdict thresholds](#verdict-thresholds)
14
14
  - [SARIF output](#sarif-output---format-sarif)
@@ -112,9 +112,19 @@ baseline the same deliberate way, with `guideline-drift.sh --reconcile`.
112
112
  | 40 | **5.3.4 Gambling** *(advisory)* | Real-money gaming language in metadata (casino, sportsbook, real money, wager); real-money gambling needs licensing, geo-restriction, and must be free on the store |
113
113
  | 41 | **5.5 MDM** *(advisory)* | A Mobile Device Management signal (`DeviceManagement`, managed-app-config, `com.apple.mdm`); MDM apps need a commercial enterprise/education entity and purpose-limited data use |
114
114
  | 42 | **2.3.3 Screenshot format/dimensions** *(advisory)* | Reads each in-repo screenshot's magic bytes and, for PNGs, its IHDR pixel dimensions; WARNs on a file whose content does not match its extension, a truncated PNG, or a PNG whose size matches no known App Store screenshot size (either orientation). JPEG dimensions are not parsed (format-checked only). WARN-only — never forces a RED verdict. |
115
+ | 43 | **5.1.1(iv) Permission priming** *(advisory)* | Custom pre-permission screens whose consent CTA steers users toward granting access ("Allow and continue", "Grant access to start", bare "Enable notifications" buttons) near a runtime permission request; Apple requires neutral wording ("Continue"/"Next"). Post-denial "Enable X in Settings" guidance is excluded. Source-language strings only (String Catalogs + hardcoded literals; English + common tr/de/fr/es steering patterns) |
116
+ | 44 | **3.1.2 Trial-emphasized paywall CTA** *(advisory)* | Paywall purchase buttons that promote the free trial over the billed price ("Continue with free trial", "Start your free trial") and "free-trial toggle" paywalls (a Toggle next to trial wording) — the 2026 App Review rejection wave under 3.1.2. A CTA that already shows the price is excluded; the fix is a neutral CTA ("Continue"/"Subscribe") with price + renewal term legible next to it. Source-language strings only (English + common tr/de/fr/es trial patterns, both word orders) |
117
+ | 45 | **2.3.1 Pricing language in name/subtitle** *(advisory)* | "Free", "% off", "sale", "discount", or a currency amount in `name.txt` / `subtitle.txt` (2.3.1 / 2.3.7 accurate metadata): prices vary by storefront and belong in the price field. Hyphen compounds ("ad-free") are excluded; keywords and descriptions are not scanned. The offline complement to `fastlane precheck`'s pricing rules (Phase 2 needs ASC credentials; this does not) |
118
+ | 46 | **5.1.1(ii) Generic purpose strings** *(advisory)* | Non-empty `NS*UsageDescription` values that are very short (<20 chars) or restate the permission without the user-facing feature ("This app needs camera access"). Vector 2 checks presence; this checks substance. Static complement to deep-review check 18 |
119
+ | 47 | **5.1.1 Third-party AI consent** *(advisory)* | An external AI endpoint/SDK (OpenAI, Anthropic, Gemini, Mistral, OpenRouter, Groq, Perplexity, Together) is in the code but no user-facing string names the provider — since 2026 App Review expects a consent screen naming the AI provider and what data is shared (5.1.1 / 5.1.2(i)). The endpoint URL literal itself does not count as a mention |
120
+ | 48 | **3.1.2 Paywall urgency/scarcity** *(advisory)* | Fake-urgency purchase pressure near the paywall: "limited time" / "only today" / "last chance" copy (multilingual), or a countdown timer combined with discount wording in a paywall view (3.1.2 / 2.3.1 misleading purchase pressure) |
121
+ | 49 | **5.6.1 Rating sentiment gate** *(advisory)* | "Enjoying the app?"-style copy next to a rating-prompt API — routing only happy users to the App Store review sheet is rating manipulation (5.6.1). Signal-gated on `requestReview` / `SKStoreReviewController` / a write-review link being present |
122
+ | 50 | **5.1.1(v) Forced login** *(advisory)* | A credential login UI (SecureField / Login view) with no skip / guest / continue-without-account affordance grepped anywhere — requiring login for features that are not account-based is rejected under 5.1.1(v). WARN-verify: an app whose every feature is genuinely account-based is fine |
123
+ | 51 | **4.5.4 Marketing push opt-out** *(advisory)* | A marketing-push SDK (OneSignal, Braze, CleverTap, Iterable, Airship, MoEngage) registers for notifications but no notification-preferences / opt-out signal is found; promotional push requires explicit consent and a working opt-out (4.5.4) |
124
+ | 52 | **2.1 Xcode/SDK minimum** *(advisory)* | The highest `LastUpgradeCheck` across checked-in pbxproj files is clearly pre-26 — since April 2026, App Store uploads must be built with the iOS 26 SDK (Xcode 26) or they are auto-rejected at upload. WARN-verify: the field tracks the upgrade-check, not the actual build toolchain |
115
125
 
116
126
  Vectors 8–10 only run when in-app-purchase signals are detected (StoreKit / RevenueCat import,
117
- or a paywall view). Otherwise the scanner emits a single PASS and skips them. Vectors 16–42 are
127
+ or a paywall view). Otherwise the scanner emits a single PASS and skips them. Vectors 16–52 are
118
128
  signal-gated advisory WARNs: each emits nothing unless its triggering signal is present.
119
129
 
120
130
  ### Screenshot format + dimensions (§7b, 2.3.3)
@@ -172,11 +182,11 @@ finds; Pierre explains.
172
182
 
173
183
  ---
174
184
 
175
- ## Phase 4: Pierre deep review (28 semantic checks)
185
+ ## Phase 4: Pierre deep review (29 semantic checks)
176
186
 
177
- After Phase 3, Pierre runs the **Review Simulator**: 28 evidence-based checks the static scanner
178
- cannot fully judge — **22 Tier A** (high-confidence) plus **6 Tier B v1** heuristic checks (items
179
- **4, 5, 7, 10, 15, 28** in the checklist: 2.1 review notes, 2.2, 2.3.4, 2.3.9, 4.5.1–4.5.3,
187
+ After Phase 3, Pierre runs the **Review Simulator**: 29 evidence-based checks the static scanner
188
+ cannot fully judge — **23 Tier A** (high-confidence) plus **6 Tier B v1** heuristic checks (items
189
+ **4, 5, 7, 10, 15, 29** in the checklist: 2.1 review notes, 2.2, 2.3.4, 2.3.9, 4.5.1–4.5.3,
180
190
  5.6.1/5.6.3). Full procedure, output format, and per-check steps are in
181
191
  [`pierre-deep-review.md`](pierre-deep-review.md).
182
192
 
@@ -188,7 +198,7 @@ These are advisory; FAIL/WARN counts and GREEN/YELLOW/RED come only from Phases
188
198
  5.1.1(i) privacy policy fetch, 2.3.11–13 locale consistency, etc.). Guideline numbers touched
189
199
  are tracked in `guidelines-baseline.json` → `covered_by_pierre_deep_review`.
190
200
 
191
- **Presentation (Phase 5):** after Phase 3 commentary, show Phase 4 summary (N of 28 findings) and
201
+ **Presentation (Phase 5):** after Phase 3 commentary, show Phase 4 summary (N of 29 findings) and
192
202
  every `REVIEW-FINDING` with Pierre's 2–3 sentence explanation. Tier B v1 findings are heuristic.
193
203
 
194
204
  ---
@@ -272,4 +282,9 @@ Things the scanner cannot verify; confirm by hand before you submit:
272
282
  [ ] Build number incremented from the previous submission
273
283
  [ ] Export compliance (encryption) answered
274
284
  [ ] If using "Sign in with Apple" alongside other social logins, it is offered
285
+ [ ] Paywall price matches App Store Connect EXACTLY (amount + currency formatting)
286
+ [ ] Free trial is configured as an Introductory Offer in App Store Connect (not app-side only)
287
+ [ ] Updated age-rating questionnaire (13+/16+/18+ tiers) completed in App Store Connect
288
+ [ ] EU DSA trader status declared (required for EU distribution)
289
+ [ ] If user data goes to a third-party AI provider: consent screen names the provider
275
290
  ```
@@ -1,9 +1,9 @@
1
- # Phase 4: Pierre deep review (28 semantic checks)
1
+ # Phase 4: Pierre deep review (29 semantic checks)
2
2
 
3
3
  After Phase 3 (explaining every scan FAIL/WARN), Pierre runs a **read-only, project-wide
4
- semantic review** of 28 guideline areas the static scanner cannot fully judge. The **22 Tier A**
5
- checks (all 28 except the Tier B items below) are high-confidence; the **6 Tier B v1** checks
6
- **4, 5, 7, 10, 15, and 28** are heuristic advisory (higher false-positive risk, still useful
4
+ semantic review** of 29 guideline areas the static scanner cannot fully judge. The **23 Tier A**
5
+ checks (all 29 except the Tier B items below) are high-confidence; the **6 Tier B v1** checks
6
+ **4, 5, 7, 10, 15, and 29** are heuristic advisory (higher false-positive risk, still useful
7
7
  pre-submit signals).
8
8
 
9
9
  This is the **Review Simulator** layer: Pierre reads Swift, metadata, entitlements, screenshots,
@@ -19,10 +19,10 @@ that Pierre explains in Phase 5 presentation.
19
19
  - **Read-only:** never modify project files.
20
20
  - **Evidence-based:** cite `file:line`, metadata path, screenshot filename, or fetched URL text.
21
21
  If you cannot read something (private URL, missing file), say so — do not invent findings.
22
- - **All 28 checks, every run:** report each item as `REVIEW-PASS:` or `REVIEW-FINDING:` — no skipping.
22
+ - **All 29 checks, every run:** report each item as `REVIEW-PASS:` or `REVIEW-FINDING:` — no skipping.
23
23
  - **REVIEW-FINDING severity:** always `WARN` (advisory). Never emit `REVIEW-FINDING: … FAIL`.
24
24
  A deep-review issue informs the human; it does not block the token by itself.
25
- - **Tier B checks (4, 5, 7, 10, 15, 28):** prefer `REVIEW-PASS: … — not applicable` when the signal is absent;
25
+ - **Tier B checks (4, 5, 7, 10, 15, 29):** prefer `REVIEW-PASS: … — not applicable` when the signal is absent;
26
26
  when flagging, use cautious language ("may trigger review questions") — these are heuristics.
27
27
  - **Deepen scan hits:** when Phase 1 already flagged a guideline, Phase 4 still runs the matching
28
28
  deep check and adds semantic context (do not repeat the machine line verbatim — add what the
@@ -35,7 +35,7 @@ that Pierre explains in Phase 5 presentation.
35
35
 
36
36
  ## Output format
37
37
 
38
- For each of the 28 checks (in table order):
38
+ For each of the 29 checks (in table order):
39
39
 
40
40
  ```
41
41
  REVIEW-PASS: <guideline> — <one-line why it looks OK, with evidence pointer>
@@ -54,9 +54,15 @@ If a check is **not applicable** (e.g. no HealthKit, no VPN, no contest copy), s
54
54
  REVIEW-PASS: <guideline> — not applicable (<reason>)
55
55
  ```
56
56
 
57
+ "Not applicable" is only for checks whose subject matter is entirely absent from the
58
+ project (no HealthKit import, no VPN entitlement, no contest copy anywhere). When the
59
+ material a check inspects exists and is clean — release notes present but free of beta
60
+ language, a review prompt present but using the system API — report a plain
61
+ `REVIEW-PASS` with the evidence pointer, not "not applicable".
62
+
57
63
  ---
58
64
 
59
- ## The 28 checks (guideline order)
65
+ ## The 29 checks (guideline order)
60
66
 
61
67
  | # | Guideline | Deep question | Primary sources |
62
68
  |---|-----------|---------------|-----------------|
@@ -80,14 +86,15 @@ REVIEW-PASS: <guideline> — not applicable (<reason>)
80
86
  | 18 | **5.1.1(ii)** | Purpose strings are specific and tied to a visible feature (not empty, generic, or copy-paste)? | Info.plist, permission usage in Swift |
81
87
  | 19 | **5.1.1(iii)** | Data/permission requests proportionate to stated app purpose (no obvious over-collection)? | permissions, SDKs vs metadata promise |
82
88
  | 20 | **5.1.1(iv)** | Permission denial handled gracefully — no infinite re-prompt loops or hard blocks without explanation? | location/camera/notification/auth flows in Swift |
83
- | 21 | **5.1.2** | ATT prompt, `NSUserTrackingUsageDescription`, privacy policy tracking section, and ad SDK usage align? | Info.plist, policy fetch, ad SDK imports |
84
- | 22 | **5.1.3** | HealthKit data not used for advertising/marketing; sync paths respect health-data rules? | HealthKit + analytics/ad SDK co-use |
85
- | 23 | **5.1.4** | Kids-audience signals → parental gate before external links/purchases/account areas? | metadata kids wording, parental gate UI |
86
- | 24 | **5.4** | VPN/NetworkExtension → on-screen disclosure text visible in UI strings (not only Info.plist)? | Swift strings, NetworkExtension usage |
87
- | 25 | **5.2.1–5.2.3** | Obvious third-party trademark/brand misuse in metadata, assets, or UI copy? | metadata, asset filenames, Swift strings |
88
- | 26 | **5.3.1–5.3.3** | Contest/sweepstakes/lottery copy → official rules/eligibility/disclosure present in metadata? | description, keywords, in-app contest UI |
89
- | 27 | **5.6.2–5.6.3** | Developer identity consistent: app name, support URL content, bundle/marketing domain match? | fetch support URL, metadata, legal/footer copy |
90
- | 28 | **5.6.1 / 5.6.3** | Rating/review manipulation dark patterns (withhold features until 5 stars, direct write-review links without `requestReview`)? | Swift, metadata, §25 scan context |
89
+ | 21 | **5.1.1(iv)** | Custom pre-permission priming screens use neutral CTA copy ("Continue"/"Next") — no steering toward Allow/Grant/Enable? | priming/onboarding views, xcstrings CTA strings, §42 scan context |
90
+ | 22 | **5.1.2** | ATT prompt, `NSUserTrackingUsageDescription`, privacy policy tracking section, and ad SDK usage align? | Info.plist, policy fetch, ad SDK imports |
91
+ | 23 | **5.1.3** | HealthKit data not used for advertising/marketing; sync paths respect health-data rules? | HealthKit + analytics/ad SDK co-use |
92
+ | 24 | **5.1.4** | Kids-audience signals → parental gate before external links/purchases/account areas? | metadata kids wording, parental gate UI |
93
+ | 25 | **5.4** | VPN/NetworkExtension → on-screen disclosure text visible in UI strings (not only Info.plist)? | Swift strings, NetworkExtension usage |
94
+ | 26 | **5.2.1–5.2.3** | Obvious third-party trademark/brand misuse in metadata, assets, or UI copy? | metadata, asset filenames, Swift strings |
95
+ | 27 | **5.3.1–5.3.3** | Contest/sweepstakes/lottery copy → official rules/eligibility/disclosure present in metadata? | description, keywords, in-app contest UI |
96
+ | 28 | **5.6.2–5.6.3** | Developer identity consistent: app name, support URL content, bundle/marketing domain match? | fetch support URL, metadata, legal/footer copy |
97
+ | 29 | **5.6.1 / 5.6.3** | Rating/review manipulation dark patterns (withhold features until 5 stars, direct write-review links without `requestReview`)? | Swift, metadata, §25 scan context |
91
98
 
92
99
  ---
93
100
 
@@ -220,43 +227,58 @@ REVIEW-PASS: <guideline> — not applicable (<reason>)
220
227
  1. Trace location/camera/photo/notification permission flows.
221
228
  2. Flag forced loops, dead-ends, or dark patterns after denial.
222
229
 
223
- ### 21 — 5.1.2 ATT consistency
230
+ ### 21 — 5.1.1(iv) Permission-priming CTA neutrality
231
+
232
+ 1. Find custom pre-permission ("priming") screens: views that explain an upcoming permission
233
+ request and whose button triggers `requestAccess` / `requestAuthorization` /
234
+ `requestRecordPermission`.
235
+ 2. Read the consent CTA copy on those screens (xcstrings source-language values and hardcoded
236
+ button titles).
237
+ 3. Flag steering wording on the gate button — "Allow …", "Grant …", "Enable …", "Turn on …" —
238
+ Apple requires neutral wording like "Continue" or "Next"; the grant/deny decision belongs to
239
+ the system alert. Body copy explaining *why* the permission helps is fine; post-denial
240
+ "Enable X in Settings" guidance is Apple's own recommended pattern and is fine.
241
+ 4. Cross-check scan §42 (`permission-priming-cta`) — Phase 4 adds semantic judgement the static
242
+ regex cannot: is the flagged string really on a consent gate, and does the flow stay usable
243
+ if the user declines (ties into check 20)?
244
+
245
+ ### 22 — 5.1.2 ATT consistency
224
246
 
225
247
  1. If ad/attribution SDK or IDFA access: confirm ATT API usage and description text.
226
248
  2. Cross-check privacy policy tracking section vs implementation.
227
249
 
228
- ### 22 — 5.1.3 HealthKit + ads
250
+ ### 23 — 5.1.3 HealthKit + ads
229
251
 
230
252
  1. If HealthKit imported: search for analytics/ad SDK sending health-derived signals.
231
253
  2. Flag health data paths combined with advertising identifiers.
232
254
 
233
- ### 23 — 5.1.4 Parental gate
255
+ ### 24 — 5.1.4 Parental gate
234
256
 
235
257
  1. If kids metadata or child-audience copy: find parental gate before web/links/IAP/account.
236
258
  2. Flag child positioning without age gate UI.
237
259
 
238
- ### 24 — 5.4 VPN disclosure UI
260
+ ### 25 — 5.4 VPN disclosure UI
239
261
 
240
262
  1. If NetworkExtension/NEVPNManager: search UI strings for data-collection disclosure required at launch/settings.
241
263
  2. Flag VPN capability with no user-visible disclosure copy.
242
264
 
243
- ### 25 — 5.2.1–5.2.3 IP / trademarks
265
+ ### 26 — 5.2.1–5.2.3 IP / trademarks
244
266
 
245
267
  1. Scan metadata and visible strings for other companies' brands used as if owned.
246
268
  2. Flag likely trademark misuse (not generic descriptive use).
247
269
 
248
- ### 26 — 5.3.1–5.3.3 Contests
270
+ ### 27 — 5.3.1–5.3.3 Contests
249
271
 
250
272
  1. If sweepstakes/contest/giveaway language: check for rules, eligibility, sponsor, no-purchase-necessary.
251
273
  2. Flag contest marketing without rules in metadata or in-app.
252
274
 
253
- ### 27 — 5.6.2–5.6.3 Developer identity
275
+ ### 28 — 5.6.2–5.6.3 Developer identity
254
276
 
255
277
  1. Fetch support URL; confirm it resolves and shows developer contact or support path.
256
278
  2. Compare app name, support domain, and privacy policy domain for consistency.
257
279
  3. Flag placeholder support pages or identity mismatch.
258
280
 
259
- ### 28 — 5.6.1 / 5.6.3 Rating/review manipulation *(Tier B v1)*
281
+ ### 29 — 5.6.1 / 5.6.3 Rating/review manipulation *(Tier B v1)*
260
282
 
261
283
  1. Grep Swift and metadata for: `itms-apps://` write-review URLs, `apps.apple.com/.../write-review`,
262
284
  "rate 5 stars", "only enable after review", custom star-rating UI tied to App Store review.
@@ -271,6 +293,6 @@ After Phase 4, include in the final report:
271
293
 
272
294
  1. Trilingual verdict block (from scan counts only).
273
295
  2. Phase 3 commentary (every scan FAIL/WARN).
274
- 3. Phase 4 summary table: 28 checks → count of `REVIEW-FINDING` vs `REVIEW-PASS` (note Tier B items 4, 5, 7, 10, 15, 28 if any fired). The 5 screenshot-vision checks (S1–S5) report as a separate "+5 vision checks" sub-block, outside the "of 28" count.
296
+ 3. Phase 4 summary table: 29 checks → count of `REVIEW-FINDING` vs `REVIEW-PASS` (note Tier B items 4, 5, 7, 10, 15, 29 if any fired). The 5 screenshot-vision checks (S1–S5) report as a separate "+5 vision checks" sub-block, outside the "of 29" count.
275
297
  4. Phase 4 detail: every `REVIEW-FINDING` with Pierre explanation; optionally list `REVIEW-PASS` lines compactly.
276
298
  5. Verbatim Phase 1 scan output + verdict/token action.
@@ -27,6 +27,11 @@ rule_slug() {
27
27
  37) echo safari-extension ;; 38) echo account-no-delete ;;
28
28
  39) echo kids-ads-analytics ;; 40) echo realmoney-gambling ;;
29
29
  41) echo mdm ;; 42) echo screenshot-dimensions ;;
30
+ 43) echo permission-priming-cta ;; 44) echo paywall-trial-emphasis ;;
31
+ 45) echo metadata-pricing-language ;; 46) echo generic-purpose-string ;;
32
+ 47) echo ai-provider-consent ;; 48) echo paywall-urgency ;;
33
+ 49) echo rating-sentiment-gate ;; 50) echo forced-login ;;
34
+ 51) echo push-marketing-optout ;; 52) echo xcode-sdk-requirement ;;
30
35
  *) echo "" ;;
31
36
  esac
32
37
  }
@@ -1037,6 +1037,380 @@ if [[ -n "$IOS_DIR" ]]; then
1037
1037
  fi
1038
1038
  fi
1039
1039
 
1040
+ # ===================================================================
1041
+ # §42 — 5.1.1(iv) Permission-priming steering language (catalog vector 43)
1042
+ # ===================================================================
1043
+ # Apple rejects custom pre-permission ("priming") screens whose consent button
1044
+ # pushes the user toward granting access — e.g. "Allow and continue",
1045
+ # "Grant access to start", "Enable notifications". Review asks for neutral CTA
1046
+ # wording ("Continue", "Next"); the decision belongs to the system alert.
1047
+ # Fires only when the code actually requests a runtime permission. Post-denial
1048
+ # Settings guidance ("Enable X in Settings") is Apple's own recommended pattern
1049
+ # and is excluded. Heuristic: source-language (usually English) strings only.
1050
+ set_rule "permission-priming-cta"
1051
+ if [[ -n "$IOS_DIR" ]]; then
1052
+ perm_api=$(grep -rlE 'requestRecordPermission|requestAccess[[:space:](]|requestAuthorization|requestWhenInUseAuthorization|requestAlwaysAuthorization|AVCaptureDevice\.requestAccess|PHPhotoLibrary\.requestAuthorization' \
1053
+ "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1054
+ if [[ -n "$perm_api" ]]; then
1055
+ # A verb that steers toward granting, and the "…and continue"-style tail
1056
+ # that marks a gate button rather than a sentence of body copy.
1057
+ # English + common tr/de/fr/es steering verbs and gate-button tails, so a
1058
+ # non-English source language ("İzin ver ve devam et") is not a blind spot.
1059
+ steer_re='(please )?(allow|grant|enable|authorize|activate|permit|turn on|give access|(İ|i)zin ver|erişime? izin|etkinleştir|erlauben|zulassen|aktivieren|autoriser|activer|permitir|activar)'
1060
+ tail_re='(continue|proceed|next|start|begin|get started|devam( et)?|başla|ileri|fortfahren|weiter|starten|continuer|commencer|continuar|empezar|siguiente)'
1061
+ bare_re="^${steer_re} ((access|permissions?|the |your )?(microphone|camera|notifications?|location|photos?|contacts|reminders|calendar|bluetooth|tracking|access)[ ]?)+[[:punct:]]?$"
1062
+ prime_hits=""
1063
+ # (a) String Catalog source-language values that read like a steering consent CTA.
1064
+ if have_jq; then
1065
+ while IFS= read -r cat_file; do
1066
+ [[ -z "$cat_file" ]] && continue
1067
+ while IFS=$'\t' read -r sc_key sc_val; do
1068
+ [[ -z "$sc_val" ]] && sc_val="$sc_key"
1069
+ (( ${#sc_val} > 48 )) && continue # sentence copy, not a button
1070
+ printf '%s' "$sc_val" | grep -qi 'settings' && continue # post-denial Settings guidance is fine
1071
+ if printf '%s' "$sc_val" | grep -qiE "${steer_re}\b[^.!?]{0,24}\b${tail_re}\b" \
1072
+ || printf '%s' "$sc_val" | grep -qiE "$bare_re"; then
1073
+ prime_hits+="${cat_file}: \"${sc_key}\" = \"${sc_val}\""$'\n'
1074
+ fi
1075
+ done < <(jq -r '(.sourceLanguage // "en") as $src
1076
+ | .strings | to_entries[]
1077
+ | [.key, (.value.localizations[$src].stringUnit.value // "")]
1078
+ | @tsv' "$cat_file" 2>/dev/null)
1079
+ done < <(find . "${PRUNE[@]}" -name '*.xcstrings' -type f 2>/dev/null)
1080
+ fi
1081
+ # (b) Swift/ObjC string literals with the same steering-CTA shape (apps
1082
+ # without a String Catalog, or hardcoded button titles).
1083
+ lit_hits=$(grep -rniE "\"${steer_re}[^\"]{0,24}\\b${tail_re}\\b[^\"]{0,10}\"" \
1084
+ "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null \
1085
+ | grep -viE 'settings' | grep -vE ':[[:digit:]]+:[[:space:]]*(//|/?\*)' | head -10)
1086
+ [[ -n "$lit_hits" ]] && prime_hits+="$lit_hits"$'\n'
1087
+ prime_hits="$(printf '%s' "$prime_hits" | grep -v '^$' | head -10)"
1088
+ if [[ -n "$prime_hits" ]]; then
1089
+ prime_first="$(printf '%s\n' "$prime_hits" | head -1)"
1090
+ prime_file="${prime_first%%:*}"
1091
+ warn "5.1.1(iv) Permission priming — CTA copy steers users toward granting a permission (e.g. \"Allow and continue\"); Apple requires neutral wording like \"Continue\" or \"Next\" on custom pre-permission screens (5.1.1(iv)):" "$prime_file"
1092
+ detail "$prime_hits"
1093
+ else
1094
+ pass "5.1.1(iv) Permission priming — permission requests present, no steering CTA copy detected (heuristic; source-language strings only)"
1095
+ fi
1096
+ fi
1097
+ fi
1098
+
1099
+ # ===================================================================
1100
+ # §43 — 3.1.2 Trial-emphasized paywall CTA + free-trial toggle (catalog vector 44)
1101
+ # ===================================================================
1102
+ # Since early 2026 App Review has been rejecting paywalls whose purchase button
1103
+ # promotes the free trial more conspicuously than the billed price ("Continue
1104
+ # with free trial", "Start free trial") and "free trial toggle" paywalls,
1105
+ # citing 3.1.2 (confusing/misleading subscription flow). The fix that passes
1106
+ # review is a neutral CTA ("Continue"/"Subscribe") with the price and renewal
1107
+ # term legible next to it. Signal-gated on IAP signals. Heuristic:
1108
+ # source-language strings only; button-length strings only (sentences are body
1109
+ # copy); a CTA that already shows the price is excluded.
1110
+ set_rule "paywall-trial-emphasis"
1111
+ if [[ -n "$iap_detected" ]]; then
1112
+ # Two branches: verb→free (English word order: "Start your free trial") and
1113
+ # free→verb (tr/de/fr/es order: "Ücretsiz denemeyi başlat", "Kostenlos testen").
1114
+ trialcta_re='\b(start|begin|continue|claim|activate|redeem|unlock|try|başlat|dene|devam|starten|testen?|essayer|essai|probar|prueba)\b[^.!?"]{0,28}\b(free|(Ü|ü)cretsiz|kostenlos|gratuit(e)?|gratis)\b|\b(free|(Ü|ü)cretsiz|kostenlos|gratuit(e)?|gratis)\b[^.!?"]{0,28}\b(trial|başlat|dene(me)?(yi)?|devam|starten|testen|weiter|essai|continuer|prueba|continuar)\b'
1115
+ price_in_cta_re='[$€£¥₺]|[0-9]+[.,][0-9]{2}|/ ?(year|month|week|yr|mo)\b'
1116
+ cta_hits=""
1117
+ # (a) String Catalog source-language values shaped like a trial-first CTA.
1118
+ if have_jq; then
1119
+ while IFS= read -r cat_file; do
1120
+ [[ -z "$cat_file" ]] && continue
1121
+ while IFS=$'\t' read -r sc_key sc_val; do
1122
+ [[ -z "$sc_val" ]] && sc_val="$sc_key"
1123
+ (( ${#sc_val} > 48 )) && continue # sentence copy, not a button
1124
+ printf '%s' "$sc_val" | grep -qiE "$price_in_cta_re" && continue # CTA already shows the price
1125
+ if printf '%s' "$sc_val" | grep -qiE "$trialcta_re"; then
1126
+ cta_hits+="${cat_file}: \"${sc_key}\" = \"${sc_val}\""$'\n'
1127
+ fi
1128
+ done < <(jq -r '(.sourceLanguage // "en") as $src
1129
+ | .strings | to_entries[]
1130
+ | [.key, (.value.localizations[$src].stringUnit.value // "")]
1131
+ | @tsv' "$cat_file" 2>/dev/null)
1132
+ done < <(find . "${PRUNE[@]}" -name '*.xcstrings' -type f 2>/dev/null)
1133
+ fi
1134
+ # (b) Hardcoded Swift/ObjC string literals with the same trial-first CTA shape.
1135
+ cta_lit_hits=$(grep -rniE "\"(start|begin|continue|claim|activate|redeem|unlock|try|başlat|dene|devam|starten|testen?|essayer|probar)[^\"]{0,28}(free|(Ü|ü)cretsiz|kostenlos|gratuit|gratis)[^\"]{0,14}\"|\"[^\"]{0,10}(free|(Ü|ü)cretsiz|kostenlos|gratuit|gratis)[^\"]{0,28}(trial|başlat|dene(me)?(yi)?|devam|starten|testen|essai|prueba)[^\"]{0,14}\"" \
1136
+ "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null \
1137
+ | grep -viE "$price_in_cta_re" | grep -vE ':[[:digit:]]+:[[:space:]]*(//|/?\*)' | head -10)
1138
+ [[ -n "$cta_lit_hits" ]] && cta_hits+="$cta_lit_hits"$'\n'
1139
+ cta_hits="$(printf '%s' "$cta_hits" | grep -v '^$' | head -10)"
1140
+ if [[ -n "$cta_hits" ]]; then
1141
+ cta_first="$(printf '%s\n' "$cta_hits" | head -1)"
1142
+ warn "3.1.2 Paywall trial CTA — purchase button copy emphasizes the free trial over the price (e.g. \"Continue with free trial\"); App Review rejects trial-first CTAs under 3.1.2 — use a neutral CTA (\"Continue\"/\"Subscribe\") with the billed price and renewal term legible next to it:" "${cta_first%%:*}"
1143
+ detail "$cta_hits"
1144
+ fi
1145
+ # (c) Free-trial toggle: a Toggle control next to trial wording in a paywall
1146
+ # view — the "toggle paywall" pattern App Review now calls confusing (3.1.2).
1147
+ toggle_hits=""
1148
+ paywall_trial_re='free[[:space:]]?trial|trial[[:space:]]?period|ücretsiz[[:space:]]?dene|essai[[:space:]]?gratuit'
1149
+ for pw in "${PAYWALL_FILES[@]+"${PAYWALL_FILES[@]}"}"; do
1150
+ if grep -qE 'Toggle\(|UISwitch' "$pw" 2>/dev/null && grep -qiE "$paywall_trial_re" "$pw" 2>/dev/null; then
1151
+ toggle_hits+="$pw"$'\n'
1152
+ fi
1153
+ done
1154
+ toggle_hits="$(printf '%s' "$toggle_hits" | grep -v '^$' | awk '!seen[$0]++' | head -5)"
1155
+ if [[ -n "$toggle_hits" ]]; then
1156
+ warn "3.1.2 Free-trial toggle — a paywall view combines a Toggle with free-trial wording; App Review has been rejecting \"free trial toggle\" paywalls as confusing/misleading (3.1.2). Show one clear price + renewal term instead of a trial switch:" "$(printf '%s\n' "$toggle_hits" | head -1)"
1157
+ detail "$toggle_hits"
1158
+ fi
1159
+ if [[ -z "$cta_hits" && -z "$toggle_hits" ]]; then
1160
+ pass "3.1.2 Paywall trial CTA — IAP present, no trial-emphasized CTA or free-trial-toggle pattern detected (heuristic; source-language strings only)"
1161
+ fi
1162
+ fi
1163
+
1164
+ # ===================================================================
1165
+ # §44 — 2.3.1 Pricing / promo language in app name or subtitle (catalog vector 45)
1166
+ # ===================================================================
1167
+ # "Free", "% off", "sale", or a currency amount in the app NAME or SUBTITLE is
1168
+ # a recurring metadata rejection (2.3.1 / 2.3.7 accurate metadata): prices vary
1169
+ # by storefront and change over time, so they belong in the price field, not
1170
+ # the title. Scoped to name.txt + subtitle.txt only (keywords and descriptions
1171
+ # legitimately mention pricing). Compounds like "ad-free" are excluded.
1172
+ set_rule "metadata-pricing-language"
1173
+ if [[ -d "$META_DIR" ]]; then
1174
+ price_meta_re='\bfree\b|\bgratis\b|\bsale\b|[0-9]+[[:space:]]?%[[:space:]]?off|\bdiscount\b|[$€£¥₺][[:space:]]?[0-9]|[0-9]+[.,][0-9]{2}[[:space:]]?(usd|eur|gbp|try|tl)\b'
1175
+ price_hits=""
1176
+ for loc in "${LOCALES[@]+"${LOCALES[@]}"}"; do
1177
+ for mf in name.txt subtitle.txt; do
1178
+ f="$META_DIR/$loc/$mf"; [[ -f "$f" ]] || continue
1179
+ # `grep -- '-free'` guard: hyphen compounds ("ad-free", "hassle-free")
1180
+ # are feature claims, not prices; dropping the whole line is acceptable
1181
+ # for a WARN-level heuristic.
1182
+ h=$(grep -HinE "$price_meta_re" "$f" 2>/dev/null | grep -vi -- '-free' | head -3)
1183
+ [[ -n "$h" ]] && price_hits+="$h"$'\n'
1184
+ done
1185
+ done
1186
+ price_hits="$(printf '%s' "$price_hits" | grep -v '^$' | head -10)"
1187
+ if [[ -n "$price_hits" ]]; then
1188
+ price_first="$(printf '%s\n' "$price_hits" | head -1)"
1189
+ warn "2.3.1 Pricing language in app name/subtitle — price or promo wording (\"Free\", \"% off\", a currency amount) in the name or subtitle is a common metadata rejection (2.3.1/2.3.7); prices belong in the price field, not the title:" "${price_first%%:*}"
1190
+ detail "$price_hits"
1191
+ else
1192
+ pass "2.3.1 App name/subtitle — no pricing/promo language detected"
1193
+ fi
1194
+ fi
1195
+
1196
+ # ===================================================================
1197
+ # §45 — 5.1.1(ii) Generic / boilerplate purpose strings (catalog vector 46)
1198
+ # ===================================================================
1199
+ # §2 checks that purpose strings EXIST; this checks that they say something.
1200
+ # App Review rejects boilerplate that restates the permission without the
1201
+ # user-facing reason ("This app needs microphone access") under 5.1.1 — the
1202
+ # string must explain the feature ("…to record voice notes"). Static
1203
+ # complement to deep-review check 18. WARN-only heuristic: very short values
1204
+ # or values matching a pure permission-restating template.
1205
+ set_rule "generic-purpose-string"
1206
+ if [[ -f "$INFO_PLIST" ]]; then
1207
+ ps_generic_re='^(this |our )?(app|application)?[[:space:]]*(needs?|requires?|uses?|would like|wants?|is requesting)([[:space:]]+to)?([[:space:]]+(access|use))?([[:space:]]+to)?([[:space:]]+(the|your))?[[:space:]]*(camera|microphone|mic|location|photos?|photo library|gallery|contacts|calendar|reminders|bluetooth|motion|speech recognition|health data|tracking|notifications?)([[:space:]]+(access|data|permission|usage))?[.! ]*$'
1208
+ ps_total=0 ps_flagged=0
1209
+ while IFS=$'\t' read -r ps_key ps_val; do
1210
+ [[ -z "$ps_key" ]] && continue
1211
+ # Empty values are already a FAIL in §2; skip them here.
1212
+ [[ -z "${ps_val// /}" ]] && continue
1213
+ ps_total=$((ps_total + 1))
1214
+ if (( ${#ps_val} < 20 )); then
1215
+ warn "5.1.1(ii) Purpose string '$ps_key' is very short (\"$ps_val\") — App Review expects the user-facing reason, e.g. \"…to record voice notes for your entries\"" "$INFO_PLIST"
1216
+ ps_flagged=$((ps_flagged + 1))
1217
+ elif printf '%s' "$ps_val" | grep -qiE "$ps_generic_re"; then
1218
+ warn "5.1.1(ii) Purpose string '$ps_key' is boilerplate (\"$ps_val\") — it restates the permission without the feature; explain what the user gets (5.1.1(ii))" "$INFO_PLIST"
1219
+ ps_flagged=$((ps_flagged + 1))
1220
+ fi
1221
+ done < <(awk -F'[<>]' '/<key>NS[A-Za-z]+UsageDescription<\/key>/{k=$3; getline; if ($2=="string") print k"\t"$3}' "$INFO_PLIST" 2>/dev/null)
1222
+ if (( ps_total > 0 && ps_flagged == 0 )); then
1223
+ pass "5.1.1(ii) Purpose strings — $ps_total present, none look generic (heuristic)"
1224
+ fi
1225
+ fi
1226
+
1227
+ # ===================================================================
1228
+ # §46 — 5.1.1 Third-party AI provider without a named consent screen (catalog vector 47)
1229
+ # ===================================================================
1230
+ # 2026 review practice: an app that sends user data to an external AI service
1231
+ # (OpenAI, Anthropic, Google Gemini, …) must show a clear consent screen that
1232
+ # NAMES the provider and explains what data is shared (5.1.1 consent /
1233
+ # 5.1.2(i) sharing with third parties). Heuristic: if an AI endpoint/SDK is
1234
+ # in the code but the provider's name never appears inside any user-facing
1235
+ # string literal or String Catalog, the consent screen is probably missing.
1236
+ set_rule "ai-provider-consent"
1237
+ if [[ -n "$IOS_DIR" ]]; then
1238
+ ai_provider="" ai_sig=""
1239
+ for ai_pair in \
1240
+ 'api\.openai\.com|import OpenAI|OpenAIKit:OpenAI' \
1241
+ 'api\.anthropic\.com|import Anthropic|AnthropicSwift:Anthropic' \
1242
+ 'generativelanguage\.googleapis\.com|GoogleGenerativeAI|FirebaseVertexAI:Gemini' \
1243
+ 'api\.mistral\.ai:Mistral' \
1244
+ 'openrouter\.ai:OpenRouter' \
1245
+ 'api\.groq\.com:Groq' \
1246
+ 'api\.perplexity\.ai:Perplexity' \
1247
+ 'api\.together\.xyz:Together'; do
1248
+ ai_pat="${ai_pair%%:*}"; ai_name="${ai_pair##*:}"
1249
+ ai_hit=$(grep -rlE "$ai_pat" "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1250
+ [[ -n "$ai_hit" ]] && { ai_sig="$ai_hit"; ai_provider="$ai_name"; break; }
1251
+ done
1252
+ if [[ -n "$ai_provider" ]]; then
1253
+ # Provider named anywhere the user can see it: a quoted source literal or
1254
+ # any String Catalog value. Lines containing a URL are excluded — the
1255
+ # endpoint literal itself ("https://api.openai.com/…") is not a user-facing
1256
+ # mention of the provider.
1257
+ ai_named=$(grep -rniE "\"[^\"]*${ai_provider}[^\"]*\"" "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | grep -v '://' | head -1)
1258
+ [[ -z "$ai_named" ]] && ai_named=$(grep -rliE "$ai_provider" --include='*.xcstrings' "${GREP_PRUNE[@]}" . 2>/dev/null | head -1)
1259
+ if [[ -z "$ai_named" ]]; then
1260
+ warn "5.1.1 Third-party AI — user data appears to be sent to ${ai_provider} ($(basename "$ai_sig")) but no user-facing string names the provider; since 2026 App Review expects a consent screen naming the AI provider and what data is shared before the first send (5.1.1 / 5.1.2(i))" "$ai_sig"
1261
+ else
1262
+ pass "5.1.1 Third-party AI — ${ai_provider} endpoint/SDK present and the provider is named in user-facing strings; verify the consent screen appears before the first data send"
1263
+ fi
1264
+ fi
1265
+ fi
1266
+
1267
+ # ===================================================================
1268
+ # §47 — 3.1.2 Urgency / scarcity dark patterns on the paywall (catalog vector 48)
1269
+ # ===================================================================
1270
+ # Fake-urgency purchase pressure — countdown timers next to discount copy,
1271
+ # "Only today!", "Last chance", "Offer ends soon" — gets rejected under
1272
+ # 3.1.2 / 2.3.1 (misleading purchase pressure). Signal-gated on IAP signals.
1273
+ set_rule "paywall-urgency"
1274
+ if [[ -n "$iap_detected" ]]; then
1275
+ urgency_re='limited[- ]time|only today|today only|last chance|offer ends|expires (in|today|soon)|act now|hurry|final hours|don.?t miss|(S|s)ınırlı süre|(S|s)on şans|bugüne özel|nur heute|letzte chance|dernière chance|offre limitée|última oportunidad|oferta limitada'
1276
+ urg_hits=""
1277
+ # (a) Urgency copy in String Catalog values or quoted literals.
1278
+ if have_jq; then
1279
+ while IFS= read -r cat_file; do
1280
+ [[ -z "$cat_file" ]] && continue
1281
+ while IFS=$'\t' read -r sc_key sc_val; do
1282
+ [[ -z "$sc_val" ]] && sc_val="$sc_key"
1283
+ if printf '%s' "$sc_val" | grep -qiE "$urgency_re"; then
1284
+ urg_hits+="${cat_file}: \"${sc_key}\" = \"${sc_val}\""$'\n'
1285
+ fi
1286
+ done < <(jq -r '(.sourceLanguage // "en") as $src
1287
+ | .strings | to_entries[]
1288
+ | [.key, (.value.localizations[$src].stringUnit.value // "")]
1289
+ | @tsv' "$cat_file" 2>/dev/null)
1290
+ done < <(find . "${PRUNE[@]}" -name '*.xcstrings' -type f 2>/dev/null)
1291
+ fi
1292
+ urg_lit=$(grep -rniE "\"[^\"]*(${urgency_re})[^\"]*\"" "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null \
1293
+ | grep -vE ':[[:digit:]]+:[[:space:]]*(//|/?\*)' | head -10)
1294
+ [[ -n "$urg_lit" ]] && urg_hits+="$urg_lit"$'\n'
1295
+ urg_hits="$(printf '%s' "$urg_hits" | grep -v '^$' | awk '!seen[$0]++' | head -10)"
1296
+ if [[ -n "$urg_hits" ]]; then
1297
+ urg_first="$(printf '%s\n' "$urg_hits" | head -1)"
1298
+ warn "3.1.2 Paywall urgency — scarcity/urgency copy near the purchase flow (\"limited time\", \"only today\", a countdown); App Review treats fake purchase pressure as misleading (3.1.2 / 2.3.1). If the offer is real and time-boxed in App Store Connect, keep the copy factual:" "${urg_first%%:*}"
1299
+ detail "$urg_hits"
1300
+ fi
1301
+ # (b) Countdown timer inside a paywall view next to discount wording.
1302
+ urg_timer_hits=""
1303
+ for pw in "${PAYWALL_FILES[@]+"${PAYWALL_FILES[@]}"}"; do
1304
+ if grep -qE 'Timer\.publish|timeRemaining|countdown|CADisplayLink' "$pw" 2>/dev/null \
1305
+ && grep -qiE '% ?off|discount|sale|indirim|rabatt|réduction|descuento' "$pw" 2>/dev/null; then
1306
+ urg_timer_hits+="$pw"$'\n'
1307
+ fi
1308
+ done
1309
+ urg_timer_hits="$(printf '%s' "$urg_timer_hits" | grep -v '^$' | awk '!seen[$0]++' | head -5)"
1310
+ if [[ -n "$urg_timer_hits" ]]; then
1311
+ warn "3.1.2 Paywall countdown — a paywall view combines a countdown timer with discount wording; a timer that resets or pressures the purchase is a rejection risk (3.1.2 / 2.3.1). Verify the deadline is real:" "$(printf '%s\n' "$urg_timer_hits" | head -1)"
1312
+ detail "$urg_timer_hits"
1313
+ fi
1314
+ if [[ -z "$urg_hits" && -z "$urg_timer_hits" ]]; then
1315
+ pass "3.1.2 Paywall urgency — IAP present, no urgency/scarcity pattern detected (heuristic)"
1316
+ fi
1317
+ fi
1318
+
1319
+ # ===================================================================
1320
+ # §48 — 5.6.1 Sentiment-gated rating prompt (catalog vector 49)
1321
+ # ===================================================================
1322
+ # "Enjoying the app?" → happy users get the rating prompt, unhappy users get
1323
+ # a feedback form. Pre-filtering who sees the prompt is rating manipulation
1324
+ # territory under 5.6.1. Signal-gated on a rating-prompt API being present.
1325
+ set_rule "rating-sentiment-gate"
1326
+ if [[ -n "$IOS_DIR" ]]; then
1327
+ rate_api=$(grep -rlE 'requestReview|SKStoreReviewController|write-review' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1328
+ if [[ -n "$rate_api" ]]; then
1329
+ gate_re='(are you |you )?enjoying (the |this )?app|loving (the |this )?app|having a good (time|experience)|uygulamam?ızı beğen|uygulamayı beğen|gefällt (dir|ihnen) die app|vous aimez l.application|te gusta la (app|aplicación)'
1330
+ gate_hits=""
1331
+ if have_jq; then
1332
+ while IFS= read -r cat_file; do
1333
+ [[ -z "$cat_file" ]] && continue
1334
+ while IFS=$'\t' read -r sc_key sc_val; do
1335
+ [[ -z "$sc_val" ]] && sc_val="$sc_key"
1336
+ if printf '%s' "$sc_val" | grep -qiE "$gate_re"; then
1337
+ gate_hits+="${cat_file}: \"${sc_key}\" = \"${sc_val}\""$'\n'
1338
+ fi
1339
+ done < <(jq -r '(.sourceLanguage // "en") as $src
1340
+ | .strings | to_entries[]
1341
+ | [.key, (.value.localizations[$src].stringUnit.value // "")]
1342
+ | @tsv' "$cat_file" 2>/dev/null)
1343
+ done < <(find . "${PRUNE[@]}" -name '*.xcstrings' -type f 2>/dev/null)
1344
+ fi
1345
+ gate_lit=$(grep -rniE "\"[^\"]*(${gate_re})[^\"]*\"" "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null \
1346
+ | grep -vE ':[[:digit:]]+:[[:space:]]*(//|/?\*)' | head -10)
1347
+ [[ -n "$gate_lit" ]] && gate_hits+="$gate_lit"$'\n'
1348
+ gate_hits="$(printf '%s' "$gate_hits" | grep -v '^$' | awk '!seen[$0]++' | head -10)"
1349
+ if [[ -n "$gate_hits" ]]; then
1350
+ gate_first="$(printf '%s\n' "$gate_hits" | head -1)"
1351
+ warn "5.6.1 Rating sentiment gate — \"Enjoying the app?\"-style copy next to a rating prompt; routing only happy users to the App Store review sheet is rating manipulation under 5.6.1. Show the system prompt without a sentiment pre-filter:" "${gate_first%%:*}"
1352
+ detail "$gate_hits"
1353
+ else
1354
+ pass "5.6.1 Rating prompt — no sentiment pre-gate copy detected (heuristic)"
1355
+ fi
1356
+ fi
1357
+ fi
1358
+
1359
+ # ===================================================================
1360
+ # §49 — 5.1.1(v) Forced login for a possibly account-free app (catalog vector 50)
1361
+ # ===================================================================
1362
+ # 5.1.1(v): apps may not require login for features that are not
1363
+ # account-based. Heuristic: a credential login UI exists but no skip / guest /
1364
+ # continue-without-account affordance is grepped. WARN-verify (an app whose
1365
+ # every feature is genuinely account-based is fine).
1366
+ set_rule "forced-login"
1367
+ if [[ -n "$IOS_DIR" ]]; then
1368
+ login_ui=$(grep -rlE 'SecureField|UITextContentType\.password|LoginView|SignInView' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1369
+ if [[ -n "$login_ui" ]]; then
1370
+ skip_sig=$(grep -rliE '\"(skip|not now|maybe later|later|continue without|browse as guest|guest( mode)?|misafir|atla|şimdi değil|überspringen|ohne konto|plus tard|passer|omitir|más tarde)|signInAnonymously|continueAsGuest|guestMode|skipLogin|anonymousSession' \
1371
+ "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1372
+ if [[ -z "$skip_sig" ]]; then
1373
+ warn "5.1.1(v) Forced login — a credential login UI exists ($(basename "$login_ui")) but no skip/guest/continue-without-account path was found; requiring login for features that are not account-based is rejected under 5.1.1(v). Add a guest path, or verify every feature genuinely needs the account" "$login_ui"
1374
+ else
1375
+ pass "5.1.1(v) Login — a skip/guest affordance exists alongside the login UI"
1376
+ fi
1377
+ fi
1378
+ fi
1379
+
1380
+ # ===================================================================
1381
+ # §50 — 4.5.4 Marketing push SDK without a visible opt-out (catalog vector 51)
1382
+ # ===================================================================
1383
+ # Push may not be REQUIRED and promotional push needs explicit consent plus an
1384
+ # in-app opt-out (4.5.4). Signal-gated on a marketing-push SDK (not plain APNs).
1385
+ set_rule "push-marketing-optout"
1386
+ if [[ -n "$IOS_DIR" ]]; then
1387
+ push_mkt=$(grep -rlE 'import OneSignal|OneSignal\.|import Braze|BrazeKit|CleverTapSDK|import CleverTap|IterableSDK|import Iterable|AirshipCore|import Airship|MoEngageSDK|import MoEngage' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1388
+ push_reg=$(grep -rlE 'registerForRemoteNotifications|UNUserNotificationCenter' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1389
+ if [[ -n "$push_mkt" && -n "$push_reg" ]]; then
1390
+ push_optout=$(grep -rliE 'notification(s)?(Enabled|Preferences|Settings|Toggle)|pushEnabled|marketingConsent|promotional.*(opt|toggle)|bildirim ayar' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
1391
+ if [[ -z "$push_optout" ]]; then
1392
+ warn "4.5.4 Marketing push — a marketing-push SDK ($(basename "$push_mkt")) registers for notifications but no in-app notification-preferences/opt-out signal was found; promotional push requires explicit consent and a working opt-out (4.5.4)" "$push_mkt"
1393
+ else
1394
+ pass "4.5.4 Marketing push — SDK present and a notification-preferences signal exists; verify promotional pushes are consent-gated"
1395
+ fi
1396
+ fi
1397
+ fi
1398
+
1399
+ # ===================================================================
1400
+ # §51 — 2.1 Xcode / iOS SDK minimum for uploads (catalog vector 52)
1401
+ # ===================================================================
1402
+ # Since April 2026, App Store uploads must be built with the iOS 26 SDK
1403
+ # (Xcode 26); older toolchains get automated upload rejections. Heuristic:
1404
+ # the highest LastUpgradeCheck across checked-in pbxproj files. That value
1405
+ # tracks "upgrade to recommended settings", not the actual toolchain, so this
1406
+ # is WARN-verify only, and only fires when the value is clearly pre-26.
1407
+ set_rule "xcode-sdk-requirement"
1408
+ last_upgrade=$(find . "${PRUNE[@]}" -name 'project.pbxproj' -type f 2>/dev/null | head -5 \
1409
+ | xargs grep -h 'LastUpgradeCheck' 2>/dev/null | grep -oE '[0-9]+' | sort -n | tail -1)
1410
+ if [[ -n "$last_upgrade" ]] && (( last_upgrade < 2600 )); then
1411
+ warn "2.1 Xcode/SDK minimum — LastUpgradeCheck=$last_upgrade suggests the project was last upgraded with a pre-26 Xcode; since April 2026 App Store uploads must be built with the iOS 26 SDK (Xcode 26) or they are auto-rejected at upload. Verify the actual build toolchain (heuristic: this field tracks the upgrade-check, not the build)"
1412
+ fi
1413
+
1040
1414
  echo "---END-OF-SCAN---"
1041
1415
  if [[ "$FORMAT" == text && "${_SUPPRESSED_COUNT:-0}" -gt 0 ]]; then
1042
1416
  printf '(%s finding(s) suppressed via .precheck-ignore)\n' "$_SUPPRESSED_COUNT"