Skip to content

Avoid common App Store and Google Play rejections. Open playbook and pre-submission guard with 117 documented rejection patterns and fixes, privacy manifest and Data safety checks, 95 tracked deadlines (EU AI Act, DSA, COPPA, age laws), and a skill for AI coding agents.

Land the October review of 153 PRs, fix five issues (#1001)

Mirza Iqbal079fd471aedc
diff --git a/.citation-allowlist b/.citation-allowlist
index d2f8186..d7cc1fb 100644
--- a/.citation-allowlist
+++ b/.citation-allowlist
@@ -51,3 +51,17 @@ https://cppa.ca.gov/regulations/ccpa_updates.html
https://digital-strategy.ec.europa.eu/en/policies/eu-age-verification
https://www.ilga.gov/legislation/ilcs/ilcs3.asp?ActID=2946
https://www.miit.gov.cn/
+
+# ftc.gov answers automated clients with 404, even for its homepage. Each page below was read with a
+# full fetch on 15 October 2026 and says what the citing doc claims. Re-read when the doc changes.
+https://www.ftc.gov/business-guidance/blog/2026/05/take-it-down-act-enforcement-starts-now-what-know-about-ftc-tida
+https://www.ftc.gov/business-guidance/resources/complying-coppa-frequently-asked-questions
+https://www.ftc.gov/news-events/news/press-releases/2024/04/ftc-finalizes-changes-health-breach-notification-rule
+https://www.ftc.gov/news-events/news/press-releases/2025/01/ftc-finalizes-changes-childrens-privacy-rule-limiting-companies-ability-monetize-kids-data
+https://www.ftc.gov/news-events/news/press-releases/2026/02/ftc-issues-coppa-policy-statement-incentivize-use-age-verification-technologies-protect-children
+https://www.ftc.gov/news-events/news/press-releases/2026/03/ftc-seeks-public-comment-response-advance-notice-proposed-rulemaking-regarding-negative-option
+
+# Deliberate unreachable fixtures used as inputs by script test suites. Never cited as fact.
+http://127.0.0.1:9/none.rss
+https://example.org/docs/NOPE.md
+https://staging.example.com/api
diff --git a/.github/SECURITY.md b/.github/SECURITY.md
index f6d962a..5505156 100644
--- a/.github/SECURITY.md
+++ b/.github/SECURITY.md
@@ -8,7 +8,7 @@ That shapes what counts as a security issue here.
## Supported versions
-The default branch is the only supported version. Fixes land on `master` and are not backported.
+The default branch is the only supported version. Fixes land on `main` and are not backported.
## Reporting a vulnerability
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ce63490..b06b0b4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,9 +2,9 @@ name: CI
on:
push:
- branches: [ master, main ]
+ branches: [ main ]
pull_request:
- branches: [ master, main ]
+ branches: [ main ]
jobs:
validate:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01a712d..c5f7882 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,10 +6,12 @@ All notable changes to this playbook are recorded here. The format follows Keep
### Changed
+- The default branch is now `main`. The CI trigger, the README badge and SECURITY.md follow it, and the bot branch ruleset excludes whichever branch is the default.
- The bot PR gate. The workflow from #442 closed every PR whose branch looked bot-generated, which caught the owner's own Jules scheduled tasks. It is replaced by a gate that closes only pull requests from bot accounts not on the allowlist (Jules, Copilot, Dependabot, GitHub Actions), without deleting the branch. Owner-run bot PRs stay open, land on the project board as Backlog through the auto-add workflow, and are reviewed by hand. The eleven Jules PRs closed on 14 September 2026 had their branches deleted by the old workflow and cannot be reopened.
### Added
+- Guard app root detection, two edges left open by #612. A React Native or Expo app with no app.json or app.config is now its own app when its package.json lists react-native or expo under dependencies and it owns an ios or android folder, so a member whose native folder holds no project file yet no longer pools into its sibling (#655). A dev or peer dependency never counts, and a native-module library with peerDependencies stays a library. A directory linked into the tree from outside it is followed one level when its target carries an app marker, unless the link is named like a vendored folder (vendor, build, node_modules and the other names the scan already skips), and scanned through its target as its own app (#657). A link back into the tree, to an ancestor, or to itself is skipped, and the target is read without following any further link, so a cycle cannot hang the scan. A linked ios or android platform folder is still not followed. A nested bare Xcode or Android project under a root framework app stays part of the root scan, now pinned by a test, because no boundary separates a demo from a shipping app without guessing from folder names (#656). A linked app is scanned beside the project, never in place of it, so a clean linked app cannot hide the project's own findings, and an empty project root beside a linked app is not reported as NOT CHECKED, unless a framework app under it still needs its native folders, which keeps NOT CHECKED. A linked Unity, MAUI, Tauri, Cordova or Capacitor app is followed too, and two links to one app scan it once. 13 new test cases, 302 total, green on bash 5 and macOS bash 3.2.
- README first-run path. A Start here table routes four kinds of reader to one action each, with the time it takes. The two-command check comes first, followed by what each last line of the guard means. The install section lists everything it writes and the undo command before the paste block. New short sections cover troubleshooting and the five words a newcomer has to know. Driven by 40 persona walks (a second model as 24 readers, and two reviewers who ran every README command in a throwaway home folder).
- `scripts/check-docs.py`. Fails CI when a Markdown file names a link, heading anchor, image, repo path, script or flag that does not exist. 9 tests prove it fails on each kind.
- The guard ends every run with a verdict. `CLEAR.` when no critical risk was found, `NOT CHECKED.` with exit 1 when the folder holds no iOS or Android project (an empty folder and an Expo app with no native folders used to look like a clean pass), and a `Next.` line after `BLOCKED.`. As a hook it still never blocks a project it could not scan.
@@ -33,6 +35,19 @@ All notable changes to this playbook are recorded here. The format follows Keep
### Fixed
+- Apple monitor keyword matching (#833). Keywords and patterns matched as substrings of the raw feed HTML, so "pla" hit "display" and "platforms", "att" hit "pattern" and "attention", and "dma" hit "admin". On the live feed, 86 items landed under License Agreement and 21 under App Tracking Transparency. Matching now runs on the visible text. Terms shorter than 8 characters match as whole words with an optional plural, and a version may follow ("WCAG2.2"). Longer terms still match inside identifiers such as `NSCameraUsageDescription` and `CLLocationManager`. License Agreement drops to 14 genuine agreement and terms posts, and "vulnerabilities" and "in-app purchasing" still match.
+- AI policy monitor feed items are reduced to plain text before matching, so a keyword inside a link target no longer counts (adopts #954, with the test it lacked). Atom title, summary and content are stripped only when their type is html or xhtml, so a plain-text field keeps its angle brackets (RFC 4287 section 3.1.1). A MIME type such as text/html or application/xhtml+xml is honored, XHTML inline elements (span, b, a and the like) run on while every other element keeps a space around its text, and an entry's summary and content both count. A MIME parameter such as `; charset=utf-8` is ignored, binary content is not searched, script and style text never counts, an extension element from another namespace never stands in for the feed's own title or summary, an RSS title has its entities decoded but its angle brackets kept (in both monitors), and inline HTML tags join their text instead of splitting words. Both monitors strip comments and tags in one linear pass. A quote inside a comment can neither leak markup nor swallow the text after it, a `<!--` inside a quoted attribute is not read as a comment, and the endings browsers accept (`<!-->`, `<!--->`, `--!>`) close a comment the way a browser closes it. CDATA sections and `textarea` or `title` content stay visible text, an unterminated `<!x` declaration ends at the end of the input, and tag names and delimiters are matched as ASCII the way HTML does, so a non-breaking space or a dotless i cannot change what counts as visible.
+- Accessibility audit (#834). A SwiftUI Button whose label shows an `Image(systemName:)` with no Text, Label or accessibility label is now reported as a possible icon-only Button under APPLE-ACCESSIBILITY-VOICEOVER, in the trailing closure, `label:` closure, and inline `label:` argument forms, written as `Button` or `SwiftUI.Button`, including `Button(role:) { action } label: { ... }` where the first closure is the action. The whole label closure counts, by design. The audit reads code without running it, so a Text anywhere in the label hides a possible icon-only Button and an unused Image can raise one. The README states this limit, and tests pin it. Swift regex literals in the #/.../# form are skipped, inside string interpolation too, and a backslash-escaped delimiter inside one does not end it early. Scanning stays fast on hostile input (nested Buttons, nested labels, nested modifiers, long chains of local bindings), and string interpolation of any depth is walked with an explicit stack instead of recursion. Only the Button's own modifier chain can supply the label, never a sibling on the same line, and a modifier with several trailing closures (`.contextMenu { } preview: { }`) does not end the chain early. A Button titled by a variable, a Button inside one or more parentheses, a spaced member dot, `#if` blocks between modifiers, escaped names in backticks, `.accessibility(label:)`, `.accessibility(hidden: true)`, `.accessibilityRepresentation` and `.accessibilityHidden((true))` are all read, and a label with `isEnabled: false` does not count. Comments, nested comments, raw strings and multiline strings are ignored, so a Button that only appears in text is not a control. The haptics rule fires only on a real `.onTapGesture` or `Button`, and is LOW and labelled advisory because neither WCAG 2.2 nor EN 301 549 requires haptics. An unknown `--rule` used to print Clean and exit 0. It now exits 2 and lists the known rules.
+- iPhone Duo App Store assets (#724). The docs said App Store Connect did not accept Duo screenshots yet. Apple opened Duo submissions and screenshots on 5 October 2026, with a product page badge for apps that upload them, and set April 2027 for Duo screenshots to become required for apps using the iOS 27.1 SDK or later, the scope Apple's screenshot specification page states. PLATFORM-MECHANICS section 1.8, the checklist, the gap analysis open item, and the Duo launch deadline now say so, and a new deadline APPLE-IPHONE-DUO-SCREENSHOTS-REQ (tracked as 1 April 2027, month only) carries the requirement. Read from Apple on 15 October 2026.
+- EU alternative payments. Under Attachment 14, in force 1 October 2026, an EU app may combine Apple In-App Purchase, alternative payment processing and out-of-app offers. The EU doc, the checklist and the DMA deadline still said they could not be mixed. They now state Apple's current terms. In-App Purchase is shown at the same time and at least as prominently, the chosen options stay in place across EU storefronts for 12 months, the entitlement is the StoreKit External Purchases or Offers Entitlement, and reporting runs through the External Purchase Server API on OS 26.4 or later. Ask to Buy is no longer listed as a lost capability, because Apple's page does not list it. The checks now include Apple's child safety rules (parental gates for minors, no out-of-app purchase on a website for Kids category apps, no out-of-app offers at all for the youngest users, higher age thresholds where a storefront sets them), the rule for apps that offer only alternatives, and the payment entitlement's own minimum OS versions. Read from Apple on 15 October 2026.
+- The European Accessibility Act duty is attributed to Directive (EU) 2019/882 Article 13(2) and Annex V, the service information published in the general terms and conditions or an equivalent document (#832). The previous text cited EN 301 549 Annexes B and C, which are the functional performance mapping and the conformance method, and used the term accessibility statement, which belongs to the public sector directive 2016/2102. Corrected in the EU doc, the pre-submission checklist, the deadline entry, and the timeline.
+- Sanctions section 3.5 no longer lists Syria as an embargoed territory, from #967 by @omaralbeik. The OFAC program ended on 1 July 2025 and the terrorism designation was rescinded effective 24 August 2026. The section now says what still applies, the Commerce license requirement in 15 CFR 746.9 with its exceptions, and the Part 569 blocking with its 50 percent ownership rule. The checklist gains a Syria export-control line.
+- Required screenshot size. The docs said the 6.9 inch iPhone set is the required one. Apple's specification page now requires at least one screenshot for iPhone with Dynamic Island (medium display), plus one iPad 13 inch screenshot when the app supports iPadOS. PLATFORM-MECHANICS and the checklist say so. Read from Apple on 15 October 2026.
+- EAA microenterprise exemption. The EU doc said accessibility funding removes the exemption. Article 4(5) carries no such condition. The funding rule is Article 14(6), which bars only the disproportionate burden defence. An unsourced claim of no grace period was removed, and the source is now the Directive itself.
+- EN 301 549 V4.1.1 was described as expected in 2026. ETSI has published it (file dated 2 September 2026). The doc says so, without claiming an Official Journal citation under the EAA.
+- `verify-citations.py` reported six live ftc.gov citations as dead, because ftc.gov answers automated clients with 404, even for its homepage. Each page was read in full on 15 October 2026 and the six URLs moved into the allowlist next to the other government sites that block automated checks. Three deliberate test fixture URLs moved into the allowlist too.
+- `test-deadline-checker.py` left a file handle open (from #980 and #914).
+- The EU doc said Attachment 14 is accepted in App Store Connect and that EU submissions are blocked without it. Apple's DMA page says the Account Holder accepts it in the Apple Developer account, and that acceptance unlocks the alternative payment entitlement and distribution tools. It says nothing about blocked submissions, so neither does the doc now.
- `monitor.py` fell back to built-in sample announcements without a word when Apple's feed could not be reached. It now says so on stderr.
- `metadata-audit.py` on a folder with no listing files, or on a path that does not exist, exited 0. It exits 1 and names the files to add.
- `release-audit.py` ran silently for about two minutes. It now labels its two steps and says how long the first takes.
diff --git a/README.md b/README.md
index 5df89b6..330c456 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Stop getting your iOS and Android apps rejected. The enterprise reference and au
[![Google Play](https://img.shields.io/badge/Google_Play-414141?logo=googleplay&logoColor=white)](https://play.google/developer-content-policy/)
[![Claude Code](https://img.shields.io/badge/Claude_Code-ready-000000?logo=anthropic&logoColor=white)](#how-you-actually-use-this)
[![OpenRoots ORA 2.3](https://openroots.org/badge/ora.svg)](https://openroots.org/licenses/ora/2.3)
-[![CI](https://img.shields.io/github/actions/workflow/status/mjmirza/app-store-compliance/ci.yml?branch=master&label=CI)](https://github.com/mjmirza/app-store-compliance/actions)
+[![CI](https://img.shields.io/github/actions/workflow/status/mjmirza/app-store-compliance/ci.yml?branch=main&label=CI)](https://github.com/mjmirza/app-store-compliance/actions)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-2ea44f)](.github/CONTRIBUTING.md)
[![Stars](https://img.shields.io/github/stars/mjmirza/app-store-compliance?style=social)](https://github.com/mjmirza/app-store-compliance/stargazers)
@@ -329,6 +329,8 @@ python3 scripts/deadline-checker.py
| `settings.json` was not changed | It was read-only, not valid JSON, or neither python3 nor jq is installed. The installer printed the block to paste by hand |
| The guard does not fire in Claude Code | Restart Claude Code once, then run `install.sh doctor` |
| `verify-citations.py` seems stuck | It checks about 300 links over the network and prints at the end. Give it a few minutes |
+| A demo or example app inside your app is scanned with it | A nested Xcode or Android project under a React Native, Expo, Flutter, or Capacitor root stays part of the root's scan, because nothing tells a demo from a shipping app. To scan the nested app alone, point the guard at its folder |
+| `accessibility-audit.py` says Clean | It is a static scan. It computes no contrast ratio for icons and other non-text elements and does not check focus order in custom controls. It reads a Button label without running the code, so anything written inside the label counts, shown or not. A Text, a Label, or the word accessibilityLabel anywhere in it hides a possible icon-only Button, and an Image(systemName:) that is never shown can still raise one. Regex literals are skipped only in the #/.../# form, not bare /.../. Test those with VoiceOver, TalkBack, and Accessibility Inspector |
## Words used here
diff --git a/agent-os/hooks/app-store-compliance-guard-test.sh b/agent-os/hooks/app-store-compliance-guard-test.sh
index 2b1cde4..6345eb1 100755
--- a/agent-os/hooks/app-store-compliance-guard-test.sh
+++ b/agent-os/hooks/app-store-compliance-guard-test.sh
@@ -1538,6 +1538,120 @@ OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
[ "$(echo "$OUT" | grep -c '^App\. ')" -eq 2 ] && [ "$RC" -eq 2 ] && ok "612-37 an app with a peer dependency and its own platform projects is an app" || bad "612-37 an app with a peer dependency and its own platform projects is an app (rc=$RC sections=$(echo "$OUT" | grep -c '^App\. '))"
rm -rf "$D"
+# ===== Issues #655, #656, #657. App root detection edges left open by #614 =====
+# An Expo app next to a workspace member that is a React Native app by package.json alone. $1 is the member's native folder.
+mk_rn_pkg_member() {
+ local d; d="$(mktemp -d)"; mkdir -p "$d/apps/a/ios/App" "$d/apps/b/src"
+ printf '{"expo":{"name":"a"}}' > "$d/apps/a/app.json"
+ printf '<plist><dict></dict></plist>' > "$d/apps/a/ios/App/Info.plist"
+ printf '{"name":"b","dependencies":{"react":"18.3.1","%s":"0.75.0"}}' "$2" > "$d/apps/b/package.json"
+ printf 'export default function B() {}\n' > "$d/apps/b/src/App.tsx"
+ case "$1" in
+ ios) mkdir -p "$d/apps/b/ios/B"; printf "platform :ios, '15.0'\n" > "$d/apps/b/ios/Podfile"; printf 'import UIKit\n' > "$d/apps/b/ios/B/AppDelegate.swift" ;;
+ android) mkdir -p "$d/apps/b/android/app/src/main/java"; printf 'org.gradle.jvmargs=-Xmx2g\n' > "$d/apps/b/android/gradle.properties" ;;
+ esac
+ echo "$d"
+}
+# 655 a React Native or Expo app with no app.json or app.config is an app when package.json depends on it and it owns a native folder
+D="$(mk_rn_pkg_member ios react-native)"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+[ "$(echo "$OUT" | grep -c '^App\. ')" -eq 2 ] && echo "$OUT" | grep -q "^App\. $D/apps/b$" && ok "655-1 a React Native workspace member with an ios folder is its own app" || bad "655-1 a React Native workspace member with an ios folder is its own app (rc=$RC sections=$(echo "$OUT" | grep -c '^App\. '))"
+rm -rf "$D"
+D="$(mk_rn_pkg_member android expo)"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+[ "$(echo "$OUT" | grep -c '^App\. ')" -eq 2 ] && echo "$OUT" | grep -q "^App\. $D/apps/b$" && ok "655-2 an Expo workspace member with only an android folder is its own app" || bad "655-2 an Expo workspace member with only an android folder is its own app (rc=$RC sections=$(echo "$OUT" | grep -c '^App\. '))"
+rm -rf "$D"
+# a native-module library. peerDependencies, react-native only as a dev dependency, ios and android source folders
+D="$(mk_rn_pkg_member none react)"; rm -rf "$D/apps/b"; mkdir -p "$D/packages/rn-lib/ios" "$D/packages/rn-lib/android/src/main/java"
+printf '{"name":"rn-lib","peerDependencies":{"react-native":"*"},"devDependencies":{"react-native":"0.75.0"}}' > "$D/packages/rn-lib/package.json"
+printf '#import <React/RCTBridgeModule.h>\n' > "$D/packages/rn-lib/ios/RNLib.m"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^Project\. $D$" && ! echo "$OUT" | grep -q '^App\. ' && ok "655-3 a native-module library with peerDependencies is still not an app" || bad "655-3 a native-module library with peerDependencies is still not an app (rc=$RC)"
+# react-native only as a dev dependency, no peerDependencies, an ios folder. a tooling package, not an app
+rm -rf "$D/packages/rn-lib"; mkdir -p "$D/tools/e2e/ios"
+printf '{"name":"e2e","devDependencies":{"react-native":"0.75.0","detox":"20.0.0"}}' > "$D/tools/e2e/package.json"
+printf 'describe("x", () => {})\n' > "$D/tools/e2e/ios/flow.js"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^Project\. $D$" && ! echo "$OUT" | grep -q '^App\. ' && ok "655-4 react-native as a dev dependency only never makes an app" || bad "655-4 react-native as a dev dependency only never makes an app (rc=$RC)"
+rm -rf "$D"
+
+# 656 documented limit, pinned. a bare Xcode project with its own Info.plist under a root Expo app stays part of the root scan
+D="$(mktemp -d)"; mkdir -p "$D/ios/App" "$D/examples/NativeDemo/Demo.xcodeproj" "$D/examples/NativeDemo/Demo"
+printf '{"expo":{"name":"root"}}' > "$D/app.json"
+printf '<plist><dict></dict></plist>' > "$D/ios/App/Info.plist"
+printf 'import CoreLocation\nlet m=CLLocationManager()\n' > "$D/ios/App/A.swift"
+printf 'X=1;\n' > "$D/examples/NativeDemo/Demo.xcodeproj/project.pbxproj"
+printf '<plist><dict></dict></plist>' > "$D/examples/NativeDemo/Demo/Info.plist"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^Project\. $D$" && ! echo "$OUT" | grep -q '^App\. ' && [ "$RC" -eq 2 ] && ok "656-1 a nested demo Xcode project never splits a root framework app" || bad "656-1 a nested demo Xcode project never splits a root framework app (rc=$RC)"
+rm -rf "$D"
+
+# 657 an app directory linked into the tree from outside it is followed one level and scanned
+mk_linked_app() { # prints the project dir. the linked app lives in a sibling temp dir, removed with rm_linked
+ local d ext; d="$(mktemp -d)"; ext="$(mk_ios_bad)"; mkdir -p "$d/apps"
+ printf 'X=1;\n' > "$ext/App/project.pbxproj"; mkdir -p "$ext/App.xcodeproj"; mv "$ext/App/project.pbxproj" "$ext/App.xcodeproj/"
+ ln -s "$ext" "$d/apps/linked"
+ echo "$d"
+}
+rm_linked() { rm -rf "$(cd "$1/apps/linked" 2>/dev/null && pwd -P)" "$1"; }
+D="$(mk_linked_app)"; mkdir -p "$D/apps/a/ios/App"
+printf '{"expo":{"name":"a"}}' > "$D/apps/a/app.json"
+printf '<plist><dict><key>ITSAppUsesNonExemptEncryption</key><false/></dict></plist>' > "$D/apps/a/ios/App/Info.plist"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+LINK_SECTION="$(echo "$OUT" | awk '/^App\. .*\/apps\/linked$/{p=1;next} /^App\. |^Summary\.|^== Regulatory/{p=0} p')"
+[ "$(echo "$OUT" | grep -c '^App\. ')" -eq 2 ] && echo "$LINK_SECTION" | grep -q 'MISSING-USAGE-DESCRIPTION' && [ "$RC" -eq 2 ] && ok "657-1 a linked app beside a real app is scanned on its own" || bad "657-1 a linked app beside a real app is scanned on its own (rc=$RC sections=$(echo "$OUT" | grep -c '^App\. '))"
+rm_linked "$D"
+D="$(mk_linked_app)"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^App\. $D/apps/linked$" && echo "$OUT" | grep -q 'MISSING-USAGE-DESCRIPTION' && [ "$RC" -eq 2 ] && ok "657-2 a linked app that is the only app is still scanned" || bad "657-2 a linked app that is the only app is still scanned (rc=$RC)"
+rm_linked "$D"
+# a clean linked app must never replace the scan of the project's own unmarked source (adversarial review)
+D="$(mk_ios_bad)"; EXT="$(mk_ios_clean)"; mkdir -p "$EXT/App.xcodeproj" "$D/apps"; printf 'X=1;\n' > "$EXT/App.xcodeproj/project.pbxproj"
+ln -s "$EXT" "$D/apps/linked"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^App\. $D/apps/linked$" && echo "$OUT" | grep -q 'MISSING-USAGE-DESCRIPTION' && [ "$RC" -eq 2 ] && ok "657-4 a clean linked app does not hide the project's own critical findings" || bad "657-4 a clean linked app does not hide the project's own critical findings (rc=$RC)"
+rm -rf "$D" "$EXT"
+D="$(mktemp -d)"; EXT="$(mk_ios_clean)"; mkdir -p "$EXT/App.xcodeproj" "$D/apps"; printf 'X=1;\n' > "$EXT/App.xcodeproj/project.pbxproj"
+ln -s "$EXT" "$D/apps/linked"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q '^CLEAR\.' && ! echo "$OUT" | grep -q 'NOT CHECKED' && [ "$RC" -eq 0 ] && ok "657-5 an empty project root beside a clean linked app is CLEAR, not NOT CHECKED" || bad "657-5 an empty project root beside a clean linked app is CLEAR, not NOT CHECKED (rc=$RC)"
+rm -rf "$D" "$EXT"
+D="$(mktemp -d)"; U="$(mktemp -d)"; mkdir -p "$D/apps" "$U/ProjectSettings" "$U/Assets"
+printf 'm_EditorVersion: 6000.0.1f1\n' > "$U/ProjectSettings/ProjectVersion.txt"
+printf 'using UnityEngine;\nclass A { void S(){ var u="https://staging.example.com"; } }\n' > "$U/Assets/A.cs"
+ln -s "$U" "$D/apps/game"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q "^App\. $D/apps/game$" && ok "657-6 a linked Unity project is followed like any other app" || bad "657-6 a linked Unity project is followed like any other app (rc=$RC)"
+rm -rf "$D" "$U"
+D="$(mktemp -d)"; EXT="$(mk_ios_bad)"; mkdir -p "$EXT/App.xcodeproj" "$D/apps"; printf 'X=1;\n' > "$EXT/App.xcodeproj/project.pbxproj"
+ln -s "$EXT" "$D/apps/one"; ln -s "$EXT" "$D/apps/two"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+[ "$(echo "$OUT" | grep -cE "^App\. $D/apps/(one|two)$")" -eq 1 ] && [ "$RC" -eq 2 ] && ok "657-7 two links to one app scan it once" || bad "657-7 two links to one app scan it once (rc=$RC sections=$(echo "$OUT" | grep -cE '^App\. '))"
+rm -rf "$D" "$EXT"
+D="$(mktemp -d)"; EXT="$(mktemp -d)"; mkdir -p "$D/apps/flutter/lib" "$EXT/App.xcodeproj"
+printf 'name: f\nflutter:\n uses-material-design: true\n' > "$D/apps/flutter/pubspec.yaml"; printf 'void main() {}\n' > "$D/apps/flutter/lib/main.dart"
+printf 'X=1;\n' > "$EXT/App.xcodeproj/project.pbxproj"; ln -s "$EXT" "$D/apps/linked"
+OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+echo "$OUT" | grep -q '^NOT CHECKED' && ! echo "$OUT" | grep -q '^CLEAR' && [ "$RC" -eq 1 ] && ok "657-9 a Flutter app with no native folder beside a clean linked app is NOT CHECKED, never CLEAR" || bad "657-9 a Flutter app with no native folder beside a clean linked app is NOT CHECKED, never CLEAR (rc=$RC)"
+rm -rf "$D" "$EXT"
+for EXCL in vendor build node_modules; do
+ D="$(mktemp -d)"; EXT="$(mk_ios_bad)"; mkdir -p "$EXT/App.xcodeproj"; printf 'X=1;\n' > "$EXT/App.xcodeproj/project.pbxproj"
+ ln -s "$EXT" "$D/$EXCL"
+ OUT="$(bash "$GUARD" "$D" 2>&1)"; RC=$?
+ ! echo "$OUT" | grep -q "^App\. $D/$EXCL$" && [ "$RC" -ne 2 ] && ok "657-8 an app linked as $EXCL stays excluded like a real $EXCL folder" || bad "657-8 an app linked as $EXCL stays excluded like a real $EXCL folder (rc=$RC)"
+ rm -rf "$D" "$EXT"
+done
+# links that point back into the tree, above it, or at themselves must not hang the scan or become apps
+D="$(mk_ios_bad)"; mkdir -p "$D/apps/a"
+ln -s "$D" "$D/apps/a/up"; ln -s . "$D/apps/here"; ln -s loop "$D/apps/loop"; ln -s "$(dirname "$D")" "$D/apps/parent"
+OUTF="$(mktemp)"; bash "$GUARD" "$D" > "$OUTF" 2>&1 & GPID=$!
+i=0; while kill -0 "$GPID" 2>/dev/null && [ "$i" -lt 120 ]; do sleep 0.5; i=$((i+1)); done
+if kill -0 "$GPID" 2>/dev/null; then kill "$GPID" 2>/dev/null; wait "$GPID" 2>/dev/null; bad "657-3 self-referencing links do not hang the scan (killed after 60s)"
+else wait "$GPID"; RC=$?; OUT="$(cat "$OUTF")"
+ ! echo "$OUT" | grep -q '^App\. ' && echo "$OUT" | grep -q 'MISSING-USAGE-DESCRIPTION' && [ "$RC" -eq 2 ] && ok "657-3 self-referencing links do not hang the scan or become apps" || bad "657-3 self-referencing links do not hang the scan or become apps (rc=$RC)"
+fi
+rm -rf "$D" "$OUTF"
+
# ===== Issue #658. The run reports how long it took, and says so when it nears the hook timeout =====
D="$(mk_ios_bad)"
OUT="$(bash "$GUARD" "$D" 2>&1)"
diff --git a/agent-os/hooks/app-store-compliance-guard.sh b/agent-os/hooks/app-store-compliance-guard.sh
index 8bc39c0..6dd5d2a 100755
--- a/agent-os/hooks/app-store-compliance-guard.sh
+++ b/agent-os/hooks/app-store-compliance-guard.sh
@@ -857,12 +857,50 @@ has_framework_marker() { # $1 dir. Expo or React Native CLI app.json, app.confi
[ -f "$1/package.json" ] && grep -qE '"react-native"|"expo"' "$1/package.json" 2>/dev/null && return 0
return 1
}
+rn_dependency() { # $1 package.json. react-native or expo under "dependencies", never a dev or peer dependency (issue #655)
+ tr -d '\n\r' < "$1" 2>/dev/null | grep -oE '"dependencies"[[:space:]]*:[[:space:]]*\{[^}]*\}' | grep -E '"(react-native|expo)"[[:space:]]*:' >/dev/null
+}
+native_dir_has_project() { # $1 an ios or android folder. 0 when a project marker sits within four levels
+ find "$1" -maxdepth 4 \( -type d \( -name Pods -o -name node_modules -o -name build \) -prune \) \
+ -o \( -name 'Info.plist' -o -name '*.xcodeproj' -o -name 'AndroidManifest.xml' -o -name 'build.gradle' -o -name 'build.gradle.kts' \) -print 2>/dev/null \
+ | grep . >/dev/null
+}
+linked_app_dir() { # $1 a symlink below the root (issue #657). 0 when it points at an app directory outside the tree.
+ # One level only. the target is read with plain find, which never follows a further link, so a cycle cannot loop.
+ local t f
+ case "${1##*/}" in ios|android) return 1 ;; esac # a linked platform folder is not followed, see the documented limits
+ case "${1##*/}" in node_modules|Pods|.git|build|dist|DerivedData|vendor|.dart_tool|Carthage|.pub-cache) return 1 ;; esac # same names find_app prunes
+ [ -d "$1" ] || return 1
+ t="$(cd "$1" 2>/dev/null && pwd -P)" || return 1
+ case "$t/" in "$ROOT_REAL"/*) return 1 ;; esac # back into the tree, or the tree itself
+ case "$ROOT_REAL/" in "$t"/*) return 1 ;; esac # the tree's own parent or an ancestor
+ is_library "$t" && return 1
+ dir_has_app_marker "$t"
+}
+dir_has_app_marker() { # $1 dir. 0 when an app marker sits at its top level
+ local t="$1" f
+ for f in app.config.js app.config.ts app.config.mjs app.config.cjs; do [ -f "$t/$f" ] && return 0; done
+ for f in "$t"/capacitor.config.* "$t"/*.xcodeproj "$t"/*.xcworkspace "$t"/settings.gradle "$t"/settings.gradle.kts; do [ -e "$f" ] && return 0; done
+ [ -f "$t/app.json" ] && grep -qE '"(expo|displayName)"' "$t/app.json" 2>/dev/null && return 0
+ [ -f "$t/pubspec.yaml" ] && { [ -d "$t/ios" ] || [ -d "$t/android" ] || [ -f "$t/lib/main.dart" ]; } && return 0
+ [ -f "$t/package.json" ] && { [ -d "$t/ios" ] || [ -d "$t/android" ]; } && rn_dependency "$t/package.json" && return 0
+ for f in "$t"/build.gradle "$t"/build.gradle.kts; do [ -f "$f" ] && grep -qE 'com\.android\.application|android\.application' "$f" 2>/dev/null && return 0; done
+ for f in "$t"/ios "$t"/android; do [ -d "$f" ] && native_dir_has_project "$f" && return 0; done
+ # Unity, .NET MAUI, Tauri, Cordova and Capacitor, the same signals scan_tree reads
+ [ -f "$t/ProjectSettings/ProjectVersion.txt" ] && return 0
+ for f in "$t"/*.csproj; do [ -f "$f" ] && grep -qE '<UseMaui>[[:space:]]*true|net[0-9.]+-(ios|android|maccatalyst)' "$f" 2>/dev/null && return 0; done
+ for f in "$t"/tauri.conf.json "$t"/tauri.conf.json5 "$t"/Tauri.toml "$t"/src-tauri/tauri.conf.json "$t"/src-tauri/tauri.conf.json5 "$t"/src-tauri/Tauri.toml; do [ -f "$f" ] && return 0; done
+ [ -f "$t/config.xml" ] && grep -qE '<widget|xmlns:cdv' "$t/config.xml" 2>/dev/null && return 0
+ [ -f "$t/package.json" ] && grep -qE '"@capacitor/core"|"cordova-(ios|android)"' "$t/package.json" 2>/dev/null && return 0
+ return 1
+}
app_roots() { # prints the roots, one per line, only when two or more distinct apps exist. the project root itself may be one of them
- local m d r k keep=() atroot=0
+ local m d r k t x keep=() seen=() atroot=0 ROOT_REAL
+ ROOT_REAL="$(cd "$DIR" 2>/dev/null && pwd -P)" || ROOT_REAL="${DIR%/}"
{
find_app 12 -name 'app.json' -o -name 'app.config.js' -o -name 'app.config.ts' -o -name 'app.config.mjs' -o -name 'app.config.cjs' \
-o -name 'pubspec.yaml' -o -name 'capacitor.config.*' -o -name 'settings.gradle' -o -name 'settings.gradle.kts' \
- -o -name '*.xcodeproj' -o -name '*.xcworkspace' -o -name 'build.gradle' -o -name 'build.gradle.kts' | while IFS= read -r m; do
+ -o -name '*.xcodeproj' -o -name '*.xcworkspace' -o -name 'build.gradle' -o -name 'build.gradle.kts' -o -name 'package.json' | while IFS= read -r m; do
case "$m" in *.xcodeproj/*|*.xcworkspace/*) continue ;; esac
case "/$m/" in *Tests/*|*/androidTest/*|*/__tests__/*|*/test/*|*/tests/*|*/integration_test/*) continue ;; esac
d="$(dirname "$m")"
@@ -870,14 +908,14 @@ app_roots() { # prints the roots, one per line, only when two or more distinct
*/app.json) grep -qE '"(expo|displayName)"' "$m" 2>/dev/null || continue ;;
*/pubspec.yaml) { [ -d "$d/ios" ] || [ -d "$d/android" ] || [ -f "$d/lib/main.dart" ]; } && ! is_library "$d" || continue ;;
*/build.gradle|*/build.gradle.kts) grep -qE 'com\.android\.application|android\.application' "$m" 2>/dev/null || continue ;;
+ */package.json) { [ -d "$d/ios" ] || [ -d "$d/android" ]; } && rn_dependency "$m" && ! is_library "$d" || continue ;; # issue #655
esac
printf '%s\n' "$d"
done
- find_app 12 -type d \( -name ios -o -name android \) | while IFS= read -r d; do
+ find_app 12 \( -type d \( -name ios -o -name android \) \) -o -type l | while IFS= read -r d; do
case "/$d/" in *Tests/*|*/androidTest/*|*/__tests__/*|*/test/*|*/tests/*|*/integration_test/*) continue ;; esac
- find "$d" -maxdepth 4 \( -type d \( -name Pods -o -name node_modules -o -name build \) -prune \) \
- -o \( -name 'Info.plist' -o -name '*.xcodeproj' -o -name 'AndroidManifest.xml' -o -name 'build.gradle' -o -name 'build.gradle.kts' \) -print 2>/dev/null \
- | grep . >/dev/null && printf '%s\n' "$d"
+ if [ -L "$d" ]; then linked_app_dir "$d" && printf '%s\n' "$d"; continue; fi
+ native_dir_has_project "$d" && printf '%s\n' "$d"
done
} 2>/dev/null | while IFS= read -r r; do
case "${r##*/}" in ios|android) is_library "$(dirname "$r")" && continue; has_framework_marker "$(dirname "$r")" && r="$(dirname "$r")" ;; esac
@@ -885,14 +923,25 @@ app_roots() { # prints the roots, one per line, only when two or more distinct
done | sort -u | {
while IFS= read -r r; do
[ "${r%/}" = "${DIR%/}" ] && { atroot=1; continue; }
- for k in ${keep[@]+"${keep[@]}"}; do case "$r/" in "$k"/*) continue 2 ;; esac; done
- [ "$atroot" -eq 1 ] && ! has_framework_marker "$r" && continue
+ # A linked app is never inside another root's scan, find does not descend it, so it is always its own root.
+ if [ -L "${r%/}" ]; then
+ t="$(cd "$r" 2>/dev/null && pwd -P)" || continue
+ for x in ${seen[@]+"${seen[@]}"}; do [ "$x" = "$t" ] && continue 2; done # two links to one app scan it once
+ seen+=("$t")
+ else
+ for k in ${keep[@]+"${keep[@]}"}; do case "$r/" in "$k"/*) continue 2 ;; esac; done
+ [ "$atroot" -eq 1 ] && ! has_framework_marker "$r" && continue
+ fi
keep+=("$r")
done
if [ "$atroot" -eq 1 ]; then
[ "${#keep[@]}" -ge 1 ] && printf '%s\n' "$DIR" "${keep[@]}"
else
- [ "${#keep[@]}" -ge 2 ] && printf '%s\n' "${keep[@]}"
+ local plain=0 links=()
+ for k in ${keep[@]+"${keep[@]}"}; do if [ -L "${k%/}" ]; then links+=("$k"); else plain=$((plain+1)); fi; done
+ if [ "$plain" -ge 2 ]; then printf '%s\n' "${keep[@]}"
+ # Fewer than two plain apps scan as one tree, as before. A linked app sits beside that scan, never in place of it.
+ elif [ "${#links[@]}" -ge 1 ]; then printf '%s\n' "$DIR" "${links[@]}"; fi
fi
}
}
@@ -942,11 +991,15 @@ $ROOTS
EOF2
fi
DIR="$ROOT"
+ [ -L "${DIR%/}" ] && DIR="$(cd "$DIR" 2>/dev/null && pwd -P)" # a linked app (issue #657) is walked through its target
echo "App. $ROOT"
scan_tree
flush_findings
# One scannable sibling must not speak for a root the store checks never ran on.
- if [ "$IS_IOS" -eq 0 ] && [ "$IS_AND" -eq 0 ] && { [ "$IS_WEB" -eq 0 ] || [ "$NEEDS_NATIVE" -eq 1 ]; }; then
+ # The project root scanned only beside a linked app, with no marker and nothing found, is not an app (#657).
+ if [ "${ROOT%/}" = "$PROJECT_ROOT" ] && [ "$IS_IOS" -eq 0 ] && [ "$IS_AND" -eq 0 ] && [ "$IS_WEB" -eq 0 ] && [ "$NEEDS_NATIVE" -eq 0 ] && ! dir_has_app_marker "$PROJECT_ROOT"; then
+ :
+ elif [ "$IS_IOS" -eq 0 ] && [ "$IS_AND" -eq 0 ] && { [ "$IS_WEB" -eq 0 ] || [ "$NEEDS_NATIVE" -eq 1 ]; }; then
UNCHECKED="${UNCHECKED:+$UNCHECKED, }${ROOT#"$PROJECT_ROOT"/}"
fi
done <<EOF
diff --git a/data/regulatory-deadlines.json b/data/regulatory-deadlines.json
index 8045409..4691ea4 100644
--- a/data/regulatory-deadlines.json
+++ b/data/regulatory-deadlines.json
@@ -83,7 +83,7 @@
"id": "EU-DMA-EXTERNAL-PURCHASE",
"jurisdiction": "European Union (EU)",
"law": "EU Digital Markets Act (DMA)",
- "requirement": "External purchase links and alternative payments (com.apple.developer.storekit.external-purchase-link entitlement, custom link sheet, CTC 5% reporting).",
+ "requirement": "Alternative payments and out-of-app offers (StoreKit External Purchases or Offers Entitlement, ExternalPurchaseCustomLink disclosure sheet, In-App Purchase at equal prominence when offered, parental gates for minors, options kept 12 months, monthly transaction reporting).",
"effective_date": "2024-03-07",
"grace_period": "none",
"mandatory_date": "2024-03-07",
@@ -109,7 +109,7 @@
"id": "EU-EAA-ACCESSIBILITY",
"jurisdiction": "European Union (EU)",
"law": "European Accessibility Act (EAA), Directive (EU) 2019/882",
- "requirement": "Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and published accessibility statement.",
+ "requirement": "Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and Annex V accessibility information published in the terms and conditions or an equivalent document (Article 13(2)).",
"effective_date": "2022-06-28",
"grace_period": "36 months",
"mandatory_date": "2025-06-28",
@@ -411,6 +411,18 @@
"affected_repository_sections": "docs/PLATFORM-MECHANICS-2026.md section 1.6, docs/APPLE.md 2026 changes, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific",
"priority": "critical"
},
+ {
+ "id": "APPLE-IPHONE-DUO-SCREENSHOTS-REQ",
+ "jurisdiction": "Apple App Store (Global)",
+ "law": "Apple App Store Submission Requirements",
+ "requirement": "Starting April 2027 App Store Connect requires iPhone Duo screenshots for any app using the iOS 27.1 SDK or later (Apple's screenshot specification page scopes it to that SDK, and the 5 October 2026 news post says every app and game submitted). App Store Connect has accepted iPhone Duo optimized apps and Duo screenshots since 5 October 2026, and a product page with Duo screenshots shows a badge that the app is optimized for iPhone Duo. Apple has published the month only, no exact day, so this entry is tracked as 1 April 2027 and must be re-checked when Apple names the date. Sources https://developer.apple.com/news/?id=kkphp5qo https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications",
+ "effective_date": "2026-10-05",
+ "grace_period": "about 6 months",
+ "mandatory_date": "2027-04-01",
+ "enforcement_date": "2027-04-01",
+ "affected_repository_sections": "docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific",
+ "priority": "high"
+ },
{
"id": "APPLE-18-PLUS-BLOCK",
"jurisdiction": "Apple App Store (Brazil, Australia, Singapore)",
@@ -1164,7 +1176,7 @@
"id": "APPLE-IPHONE-DUO-LAUNCH",
"jurisdiction": "Apple App Store (Global)",
"law": "Apple iPhone Duo platform readiness",
- "requirement": "iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. App Store Connect does not accept iPhone Duo screenshots yet (Apple says later this year), so the 6.9 inch set stays required. Tracked in issue #724. Sources https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo",
+ "requirement": "iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. Since 5 October 2026 App Store Connect accepts iPhone Duo optimized apps and Duo screenshots, which earn a product page badge, and from April 2027 Duo screenshots are required for apps using the iOS 27.1 SDK or later (APPLE-IPHONE-DUO-SCREENSHOTS-REQ). Tracked in issue #724. Sources https://developer.apple.com/news/?id=kkphp5qo https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo",
"effective_date": "2026-09-09",
"grace_period": "about 6 weeks",
"mandatory_date": "2026-10-23",
diff --git a/docs/EU-REGULATORY-2026.md b/docs/EU-REGULATORY-2026.md
index b64073d..5556ca5 100644
--- a/docs/EU-REGULATORY-2026.md
+++ b/docs/EU-REGULATORY-2026.md
@@ -74,13 +74,18 @@ There are three EU distribution channels, all still involving Apple. the App Sto
### 2.2 External purchase links and alternative payments (HARD)
-- In June 2025 Apple consolidated the non-IAP options into a single "communication and promotion of offers" entitlement. The entitlement identifier is `com.apple.developer.storekit.external-purchase-link`, and the developer signs the StoreKit External Purchase Link Entitlement Addendum for EU Apps.
-- Every external link the user can tap, click, or scan MUST call the `ExternalPurchaseCustomLink` API to show a system-provided disclosure sheet stating the user will transact with the developer and not Apple.
-- No mixing on the same storefront. An app cannot offer In-App Purchase and promote external offers within the same app on the same App Store storefront and platform.
-- Reporting. external-purchase transactions are reported through the External Purchase Server API monthly, within 15 calendar days of Apple's fiscal-month end.
-- Lost capabilities for external purchases. no Report-a-Problem, no Family Sharing, no Ask-to-Buy, no Apple purchase history or subscription management.
-
-Source. [Apple communication and promotion of offers in the EU](https://developer.apple.com/support/communication-and-promotion-of-offers-on-the-app-store-in-the-eu/).
+- From 1 October 2026 the terms sit in Attachment 14 of the Apple Developer Program License Agreement. The Alternative Terms Addendum for Apps in the EU and the StoreKit External Purchase Link Entitlement (EU) Addendum are phased out.
+- Combining is allowed. An app on EU storefronts may sell through Apple In-App Purchase, alternative payment processing within the app, out-of-app offers, or any combination of them.
+- Once a payment option or combination is chosen, it MUST be kept across all EU storefronts for 12 months.
+- When alternatives are offered alongside In-App Purchase, In-App Purchase MUST be presented at the same time and at least as prominently, with Apple-provided artwork on a black or white background, payment flows may not discourage or disrupt it, and the App Store product page may not describe alternative payment options.
+- An app that offers only alternative payment options MUST give users a genuine choice of alternative payment processing within the app, viewable and selectable on the same screen as any out-of-app offers. An app subject to Guideline 3.1.3(b) Multiplatform Services must offer In-App Purchase or alternative processing within the app.
+- Child safety. An app in the Kids category places alternative payment flows behind a parental gate and cannot offer an out-of-app purchase on a website. For users under 13, alternative payments sit behind a parental gate and out-of-app offers are not permitted. For users 13 to 17, both alternative processing and out-of-app offers sit behind a parental gate. Where an EU storefront sets a higher age for parental consent, the same protections apply at that age instead of 13, for example under 16 and 16 to 17.
+- The entitlement is the StoreKit External Purchases or Offers Entitlement, key `com.apple.developer.storekit.custom-purchase-link.allowed-regions`, an array of the ISO country codes where the app offers alternatives. It works on EU storefronts on iOS and iPadOS 26.2 or later and macOS, tvOS, visionOS and watchOS 26.6 or later. Supporting earlier versions needs Apple's agreement.
+- Alternative payment processing in the app, and any out-of-app offer behind a link the user can tap, click, or scan, MUST use the `ExternalPurchaseCustomLink` API to show the system disclosure sheet stating the user will transact with the developer and not Apple.
+- Reporting. every alternative payment transaction, including refunds, renewals and transactions that did not result in a purchase, is reported monthly within 15 days after the end of the calendar month, through the External Purchase Server API for apps on OS 26.4 or later.
+- Transactions outside In-App Purchase do not appear in Report a Problem, Family Sharing, App Store purchase history, or subscription management, and Apple cannot help with their refunds.
+
+Source, read 15 October 2026. [Apple payment options on the App Store in the EU](https://developer.apple.com/support/payment-options-on-the-app-store-in-the-eu/), [Apple communication and promotion of offers in the EU](https://developer.apple.com/support/communication-and-promotion-of-offers-on-the-app-store-in-the-eu/), [Apple apps in the EU, child safety protections](https://developer.apple.com/support/apps-in-the-eu/#child-safety-protections-for-alternative-payments-on-the-app-store).
### 2.3 The EU fee model (unified terms from 1 October 2026, verified 5 September 2026)
@@ -91,7 +96,7 @@ On 18 August 2026 Apple announced updated business terms for apps in the EU, eff
- Initial Acquisition Fee and Store Services Fee. Eliminated on 1 October 2026.
- Alternative payments. Apps may offer alternative payment options alongside Apple In-App Purchase on the App Store.
- Marketplace and Web Distribution eligibility. From 1 October 2026 a developer meeting at least one of seven alternative criteria may operate an alternative app marketplace, including a stand-by letter of credit of USD 1,000,000 or one million first annual installs worldwide.
-- Attachment 14. Must be accepted in App Store Connect by the Account Holder, or new EU submissions under the new terms are blocked.
+- Attachment 14. The Account Holder accepts it in the Apple Developer account. Accepting it moves the account to the unified EU business terms and unlocks the alternative payment entitlement and the alternative distribution tools in App Store Connect. Apple's pages read on 15 October 2026 do not say submissions are blocked without it.
Rule for a compliance tool. verify the Account Holder has accepted Attachment 14, and re-check Apple's live page before encoding any fee number. Sources. [Apple, updated business terms for apps in the EU, 18 August 2026](https://developer.apple.com/news/?id=gmws0jgp), [Apple, Attachment 14 added to the ADPLA](https://developer.apple.com/news/?id=0cgo95n6), [Apple DMA and apps in the EU](https://developer.apple.com/support/dma-and-apps-in-the-eu/).
@@ -105,13 +110,17 @@ The European Commission fined Apple 500,000,000 euro on 23 April 2025 for breach
### 2.6 What a compliance tool must CHECK for an EU app using DMA entitlements
-- The external-purchase entitlement identifier is declared when the app uses external offers.
-- Every external link the user can tap, click, or scan calls the `ExternalPurchaseCustomLink` disclosure sheet.
-- The app does NOT ship both StoreKit IAP and external-offer links on the same EU storefront.
-- External Purchase Server API reporting is wired (monthly, 15-day window).
+- The StoreKit External Purchases or Offers Entitlement is declared when the app offers alternative payments or out-of-app offers.
+- Alternative payment processing and every linked out-of-app offer call the `ExternalPurchaseCustomLink` disclosure sheet.
+- If the app offers In-App Purchase, it is shown at the same time as any alternative and at least as prominently, and the product page does not describe alternative payment options.
+- If the app offers only alternatives, alternative processing within the app is selectable on the same screen as any out-of-app offer.
+- Kids category apps and users under the storefront's parental-consent age see alternative processing only behind a parental gate. A Kids category app cannot offer an out-of-app purchase on a website, and users under that age see no out-of-app offers at all. Older minors see both only behind a parental gate.
+- The chosen payment options stay in place across all EU storefronts for 12 months.
+- Monthly transaction reporting is wired (within 15 days of the calendar month end, External Purchase Server API on OS 26.4 or later).
- Any non-App-Store build passed notarization.
- A marketplace app uses MarketplaceKit, installs only from its own domain, and runs moderation, anti-fraud, and refund handling.
-- Entitlement-using code is gated to the minimum OS (iOS and iPadOS 17.4, macOS 14.4, visionOS 1.2, watchOS 10.4).
+- Payment entitlement code is gated to iOS and iPadOS 26.2, and macOS, tvOS, visionOS and watchOS 26.6, unless Apple has agreed to earlier versions.
+- Other DMA entitlement code is gated to its own minimum OS (iOS and iPadOS 17.4, macOS 14.4, visionOS 1.2, watchOS 10.4).
- Browser-engine and HCE features carry their entitlements and are region-gated to EU or EEA.
## 3. EU Digital Services Act, trader status (HARD)
@@ -136,16 +145,16 @@ In scope are consumer products and services delivered through websites AND mobil
### 4.2 Microenterprise exemption
-A microenterprise with fewer than 10 employees AND annual turnover or balance-sheet total not exceeding 2,000,000 euro is exempt, but the exemption applies to services only, not products, has no grace period once thresholds are crossed, and does not apply if the business received accessibility funding. Source. [Greenberg Traurig EAA](https://www.gtlaw.com/en/insights/2025/7/european-accessibility-act-compliance-what-businesses-in-the-eu-market-need-to-know).
+A microenterprise with fewer than 10 employees AND annual turnover or balance-sheet total not exceeding 2,000,000 euro is exempt, and the exemption covers services only, not products (Article 4(5)). Accessibility funding does not remove that exemption. It matters elsewhere. Under Article 14(6), an operator that received outside funding meant to improve accessibility cannot rely on the disproportionate burden defence in Article 14(1)(b). Source. [Directive (EU) 2019/882, Articles 4(5) and 14](https://eur-lex.europa.eu/eli/dir/2019/882/oj).
### 4.3 The technical bar for apps
- The EAA is met through the harmonised standard EN 301 549. WCAG is the underlying guidelines set.
- EN 301 549 version 3.2.1 is built on WCAG 2.1 Level AA and adds roughly 64 requirements beyond WCAG, in particular Chapter 11 for non-web software and mobile apps. A WCAG-only audit does NOT satisfy EN 301 549 Chapter 11.
-- EN 301 549 version 4.1.1, expected in 2026, moves to WCAG 2.2.
-- An accessibility statement is required (EN 301 549 Annex B and C). A missing or inaccurate statement can be a separate penalty in some Member States.
+- EN 301 549 version 4.1.1 is published by ETSI (file dated 2 September 2026) and moves to WCAG 2.2. Its citation in the Official Journal as a harmonised standard under the EAA was not confirmed here, so check the Official Journal before relying on it for presumption of conformity. Source. [ETSI EN 301 549 V4.1.1](https://www.etsi.org/deliver/etsi_en/301500_301599/301549/04.01.01_60/en_301549v040101p.pdf).
+- Service providers must publish accessibility information. Directive (EU) 2019/882 Article 13(2). "Service providers shall prepare the necessary information in accordance with Annex V and shall explain how the services meet the applicable accessibility requirements. The information shall be made available to the public in written and oral format, including in a manner which is accessible to persons with disabilities." Annex V point 1 places it "in the general terms and conditions, or equivalent document", with a general description of the service, an explanation of its operation, and how the Annex I requirements are met. The Directive never uses the term "accessibility statement", which is the Directive (EU) 2016/2102 Article 7 term for public sector bodies. EN 301 549 V3.2.1 Annex B (informative) and Annex C (normative, determination of conformance) carry no such duty. the standard only names an accessibility statement as an example of product information in clause 12.1.1 NOTE 3. A missing or inaccurate notice can be a separate penalty in some Member States.
-Sources. [Deque EN 301 549](https://www.deque.com/en-301-549-compliance/), [EN 301 549 Chapter 11 for mobile apps](https://auditsu.com/resources/en-301-549-chapter-11-mobile-apps).
+Sources. [Directive (EU) 2019/882, Article 13 and Annex V](https://eur-lex.europa.eu/eli/dir/2019/882/oj), [ETSI EN 301 549 V3.2.1](https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf), [Directive (EU) 2016/2102 Article 7](https://eur-lex.europa.eu/eli/dir/2016/2102/oj), [Deque EN 301 549](https://www.deque.com/en-301-549-compliance/), [EN 301 549 Chapter 11 for mobile apps](https://auditsu.com/resources/en-301-549-chapter-11-mobile-apps).
### 4.4 Penalties
@@ -157,7 +166,7 @@ Penalties are set per Member State. Germany, administrative fines up to 100,000
- Dynamic Type. system font scaling supported, no fixed layout that breaks at larger text.
- Color contrast at WCAG 2.1 AA (4.5 to 1 for text, 3 to 1 for large text and UI), no information carried by color alone.
- Reduce Motion honored, logical focus order, adequate touch-target size.
-- An accessibility statement published and reachable.
+- Annex V accessibility information (how the service meets the Annex I requirements) published in the terms and conditions or an equivalent document, accessible and reachable (Directive (EU) 2019/882 Article 13(2)).
- A flag that WCAG-only coverage leaves an EN 301 549 Chapter 11 gap.
These map onto the Apple accessibility discipline the setup already carries (Dynamic Type, VoiceOver, contrast, Reduce Motion). The difference the EAA adds is that this is now a legal requirement with fines, not only a quality bar.
@@ -231,8 +240,8 @@ These are Apple App Review and App Store Connect changes, layered on top of the
| Third-party-AI consent (Apple 5.1.2(i)) | A consent modal naming the AI provider and data types, shown before data leaves the device | live since 13 Nov 2025 |
| DSA trader status | Trader or non-trader declared and verified before EU distribution | live since 17 Feb 2025 |
| Age-rating questionnaire | Answered for every app, capabilities match behaviour | deadline 31 Jan 2026 |
-| European Accessibility Act | EN 301 549 and WCAG 2.1 AA met, accessibility statement published | live since 28 Jun 2025 |
-| DMA external purchase | Entitlement declared, disclosure sheet wired, no IAP mix, reporting wired | live |
+| European Accessibility Act | EN 301 549 and WCAG 2.1 AA met, Annex V accessibility information published (Art. 13(2)) | live since 28 Jun 2025 |
+| DMA alternative payments | Entitlement declared, disclosure sheet wired, In-App Purchase at equal prominence when offered, minors behind parental gates, options kept 12 months, reporting wired | live, Attachment 14 terms from 1 Oct 2026 |
| Notarization | Any non-App-Store build notarized | live |
| Xcode 26 SDK | Build with Xcode 26 and the iOS 26 SDK | deadline 28 Apr 2026 |
| EU e-Evidence Package | Legal representative designated and 8-hour emergency response protocol established | 18 Aug 2026 |
diff --git a/docs/GAP-ANALYSIS-2026-09.md b/docs/GAP-ANALYSIS-2026-09.md
index 2cf141b..43babd3 100644
--- a/docs/GAP-ANALYSIS-2026-09.md
+++ b/docs/GAP-ANALYSIS-2026-09.md
@@ -92,7 +92,7 @@ Thirty-eight deadlines were added and eight corrected. The full dated list is in
## 8. Unverified, deliberately not encoded
- The exact day in September 2026 the social media declaration gate opened, the exact February and April 2027 days for Play technical quality and Restore Credentials, and the exact January 2027 day for the DMCCA regime. Tracked as the first of the month with the wording quoted.
-- The exact April 2027 day for the 27 SDK upload floor. Apple has named the month only. Tracked as 1 April 2027 with the wording quoted. The iPhone Duo asset upload date, which Apple gives only as later this year.
+- The exact April 2027 day for the 27 SDK upload floor. Apple has named the month only. Tracked as 1 April 2027 with the wording quoted. The iPhone Duo asset upload date, resolved on 5 October 2026 when Apple opened Duo submissions and screenshots and set April 2027 for Duo screenshots to become required ([Apple](https://developer.apple.com/news/?id=kkphp5qo)).
- The global rollout date for Android developer verification beyond Brazil, Indonesia, Singapore, and Thailand. Google has not published it.
- Whether the DOJ ADA interim final rule has been finalised, and whether the FTC AI-accuracy policy statement was adopted after 31 July 2026.
- Japan APPI law number and the six-month penalty commencement, Korea mandatory certification (1 July 2027), Korea MyData expansion dates. secondary sources only.
diff --git a/docs/PLATFORM-MECHANICS-2026.md b/docs/PLATFORM-MECHANICS-2026.md
index 57941db..421837b 100644
--- a/docs/PLATFORM-MECHANICS-2026.md
+++ b/docs/PLATFORM-MECHANICS-2026.md
@@ -54,7 +54,7 @@ App Store Connect asks, before each submission, whether the app contains, shows,
- visionOS Developer Capture. screenshots and previews use the Developer Capture feature in Reality Composer Pro, not a Control Center screen recording (which is foveated and low resolution).
- SDK minimums, effective 28 April 2026. watchOS apps build with the watchOS 26 SDK, tvOS apps with the tvOS 26 SDK, all with Xcode 26, the same deadline as iOS 26 and visionOS 26.
- SDK minimums, from April 2027. uploads must be built with the iOS 27, iPadOS 27, tvOS 27, visionOS 27, or watchOS 27 SDK or later. Apple has named the month and not the day, tracked as 1 April 2027 in the deadline data. macOS is not in Apple's list. Xcode 27 shipped as a Release Candidate on 9 September 2026.
-- App completeness (Guideline 2.1) and the privacy declarations apply to every platform, including watchOS and tvOS. Pull the exact per-device screenshot and asset dimensions live from the App Store Connect screenshot-spec page, as they change per device. The 9 September 2026 update added iPhone Duo (outer display 1398 x 2034, inner display 2007 x 2853), iPhone 18 Pro Max (1260 x 2736), iPhone 18 Pro (1179 x 2556), Apple Watch Ultra 4 (422 x 514), and Apple Watch Series 12 (416 x 496). Asset upload for iPhone Duo opens later in 2026. The 6.9 inch iPhone set remains the required one, and watch screenshots use one size across every localization.
+- App completeness (Guideline 2.1) and the privacy declarations apply to every platform, including watchOS and tvOS. Pull the exact per-device screenshot and asset dimensions live from the App Store Connect screenshot-spec page, as they change per device. The 9 September 2026 update added iPhone Duo (outer display 1398 x 2034, inner display 2007 x 2853), iPhone 18 Pro Max (1260 x 2736), iPhone 18 Pro (1179 x 2556), Apple Watch Ultra 4 (422 x 514), and Apple Watch Series 12 (416 x 496). Since 5 October 2026 App Store Connect accepts iPhone Duo screenshots, and from April 2027 they are required for any app using the iOS 27.1 SDK or later (deadline APPLE-IPHONE-DUO-SCREENSHOTS-REQ). Today the required iPhone size is at least one screenshot for iPhone with Dynamic Island (medium display), 1179 x 2556 or 1206 x 2622 portrait, plus at least one iPad 13 inch screenshot when the app supports iPadOS, and watch screenshots use one size across every localization.
Sources. [Apple submit visionOS apps](https://developer.apple.com/visionos/submit/), [Apple SDK minimums 28 April 2026](https://developer.apple.com/news/?id=ueeok6yw), [Apple submissions open for the 27 OS family, April 2027 SDK floor](https://developer.apple.com/news/?id=k1mtkt1k), [App Store Connect screenshot specifications](https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications), [App Store Connect release notes](https://developer.apple.com/help/app-store-connect/release-notes/).
@@ -77,9 +77,9 @@ Deadline ID APPLE-IPHONE-DUO-LAUNCH, tracked in issue #724. iPhone Duo has a 5.4
- Vertical bars. On the outer display, and for trailing views on the inner display, the system presents navigation bars, toolbars, and tab bars vertically on the side. Only bars supplied through `NavigationStack`, `NavigationSplitView`, or a navigation controller get this. A hand-built `UIToolbar`, `UINavigationBar`, or `UITabBar` does not. A toolbar item with a title and no icon, or with a custom view, is never shown vertically, so give every item both an icon and a title.
- Same function in every pose. Controls can move or overflow, but the same controls and content stay reachable whether the phone is open or closed. Games may lock orientation but must fill the display as the pose changes.
- Camera apps. Opening, closing, or rotating the phone can move the app to the other display and flip which way the active camera faces. Choose cameras by the direction they face.
-- App Store assets. Screenshot specifications exist (outer 1398 x 2034, inner 2007 x 2853, both orientations) but App Store Connect does not accept Duo uploads yet. Apple says later this year. Until then the 6.9 inch iPhone set is required and scaled for Duo. No Duo-specific App Review guideline or App Store Connect validation has been published, so none is enforced here. Re-check both before claiming either.
+- App Store assets. Screenshot specifications exist (outer 1398 x 2034, inner 2007 x 2853, both orientations). Since 5 October 2026 App Store Connect accepts iPhone Duo optimized apps and Duo screenshots, a product page with Duo screenshots shows a badge that the app is optimized for iPhone Duo, and a preview tool in App Store Connect shows how screenshots and metadata look on Duo. From April 2027 iPhone Duo screenshots are required for any app using the iOS 27.1 SDK or later (the screenshot specification page scopes the rule to that SDK), tracked as APPLE-IPHONE-DUO-SCREENSHOTS-REQ on 1 April 2027 because Apple has named the month only. No Duo-specific App Review guideline has been published, so none is enforced here. Re-check before claiming one.
-Sources. [Apple Newsroom, iPhone Duo announcement](https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/), [Preparing your app for iPhone Duo](https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo), [Designing for iPhone Duo (HIG)](https://developer.apple.com/design/human-interface-guidelines/designing-for-iphone-duo), [Get ready for iPhone Duo](https://developer.apple.com/iphone-duo/), [App Store Connect release notes](https://developer.apple.com/help/app-store-connect/release-notes/), [Screenshot specifications](https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications).
+Sources. [Apple Newsroom, iPhone Duo announcement](https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/), [Preparing your app for iPhone Duo](https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo), [Designing for iPhone Duo (HIG)](https://developer.apple.com/design/human-interface-guidelines/designing-for-iphone-duo), [Get ready for iPhone Duo](https://developer.apple.com/iphone-duo/), [Prepare and submit your apps for iPhone Duo, 5 October 2026](https://developer.apple.com/news/?id=kkphp5qo), [App Store Connect release notes](https://developer.apple.com/help/app-store-connect/release-notes/), [Screenshot specifications](https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications).
## 2. Google Play and Android mechanics
@@ -175,7 +175,9 @@ Verify the in-app delete flow deletes data (not deactivate), and that a publicly
### 3.5 OFAC sanctions and embargoed-territory availability (LEGAL)
-US sanctions prohibit providing goods or services to blocked persons and embargoed territories. Apple itself settled with OFAC for 466,912 dollars in 2019 for hosting a blocked developer's apps, and 2025 reporting found sanctioned-linked apps slipping into both stores, so the developer's own compliance still matters. Verify the developer or entity is not on the OFAC SDN list, and the app's country availability in App Store Connect and Play Console excludes the embargoed territories (Cuba, Iran, North Korea, Syria, and the sanctioned regions of Ukraine). Source. [TTP on sanctioned apps in the stores](https://www.techtransparencyproject.org/articles/u.s.-sanctioned-firms-find-opening-in-apple-and-google-app-stores).
+US sanctions prohibit providing goods or services to blocked persons and embargoed territories. Apple itself settled with OFAC for 466,912 dollars in 2019 for hosting a blocked developer's apps, and 2025 reporting found sanctioned-linked apps slipping into both stores, so the developer's own compliance still matters. Verify the developer or entity is not on the OFAC SDN list, and the app's country availability in App Store Connect and Play Console excludes the embargoed territories (Cuba, Iran, North Korea, and the sanctioned regions of Ukraine). Source. [TTP on sanctioned apps in the stores](https://www.techtransparencyproject.org/articles/u.s.-sanctioned-firms-find-opening-in-apple-and-google-app-stores).
+
+Syria is no longer a comprehensively embargoed territory, but it is not unrestricted either. The OFAC Syria sanctions program ended on 1 July 2025 under Executive Order 14312, OFAC then removed the Syrian Sanctions Regulations (31 CFR Part 542), and the State Department rescinded the state sponsor of terrorism designation effective 24 August 2026. Two controls remain. First, 15 CFR 746.9 still requires a Commerce license to export or reexport to Syria any item subject to the EAR, apart from EAR99 food and medicine, with listed license exceptions that include SPP for qualifying EAR99 items and CCD for qualifying consumer communications software. So before making an app available in Syria, document whether it is subject to the EAR, its classification, and the exception or license relied on. Published software can fall outside the EAR under 15 CFR 734.3(b)(3) and 734.7, but encryption needs its own analysis, and being in an app store does not by itself make an app published. Second, the list-based Assad accountability sanctions (31 CFR Part 569) still block designated persons and any entity they own 50 percent or more of, named or not, so screen counterparties and ownership, not only the developer's own name. Whether Apple or Google serve a Syria storefront is their own decision and separate from US law. Sources. [Executive Order 14312](https://www.govinfo.gov/content/pkg/DCPD-202500725/html/DCPD-202500725.htm), [15 CFR 746.9](https://www.ecfr.gov/current/title-15/subtitle-B/chapter-VII/subchapter-C/part-746/section-746.9), [15 CFR 734.7](https://www.ecfr.gov/current/title-15/subtitle-B/chapter-VII/subchapter-C/part-734/section-734.7), [31 CFR 569.406](https://www.ecfr.gov/current/title-31/subtitle-B/chapter-V/part-569/section-569.406), [OFAC FAQ 1220](https://ofac.treasury.gov/faqs/1220), [SST rescission, Federal Register 2026-17653](https://www.govinfo.gov/content/pkg/FR-2026-08-31/html/2026-17653.htm).
### 3.6 ADA Title III accessibility litigation (LEGAL, US)
@@ -213,7 +215,7 @@ Verify. if the app takes EU or UK card payments for real goods, SCA and 3D Secur
| Child Safety Standards | Published CSAE URL, in-app report, response protocol, named contact (Social and Dating) | Google Play |
| CSAM reporting | NCMEC CyberTipline path and 1-year preservation for a US UGC app | Legal |
| Account and data deletion | In-app deletion plus a reachable web deletion URL, declared | Both |
-| Sanctions | Entity not SDN-listed, availability excludes embargoed territories | Legal |
+| Sanctions | Entity and owners not SDN-listed, availability excludes embargoed territories, export-control review before a Syria release | Legal |
| Card payments | SCA and 3D Secure on EU or UK real-goods card flows, no PAN stored, correct PCI SAQ | Legal |
| Accessibility labels | Apple Accessibility Nutrition Labels populated and not over-claimed | Apple |
diff --git a/docs/PRE-SUBMISSION-CHECKLIST.md b/docs/PRE-SUBMISSION-CHECKLIST.md
index 6815982..e8e6c2d 100644
--- a/docs/PRE-SUBMISSION-CHECKLIST.md
+++ b/docs/PRE-SUBMISSION-CHECKLIST.md
@@ -67,8 +67,9 @@ For a deep-dive reference across platform best practices, see `docs/MOBILE-SECUR
- [ ] App name is 30 characters or fewer.
- [ ] App Review contact phone number is in international format with the country code, for example +852, not digits only.
- [ ] The first consumable, first non-consumable, first auto-renewable subscription, and first non-renewing subscription are each submitted together with a new app version, never added on their own to an already approved version.
-- [ ] Screenshots cover the required 6.9 inch iPhone size and, for watch apps, one Apple Watch size used consistently across every localization, checked against the current App Store Connect specification page.
+- [ ] Screenshots include at least one for iPhone with Dynamic Island (medium display), at least one iPad 13 inch screenshot if the app supports iPadOS, and, for watch apps, one Apple Watch size used consistently across every localization, checked against the current App Store Connect specification page.
- [ ] iPhone Duo (APPLE-IPHONE-DUO-LAUNCH, ships 23 October 2026). Built with Xcode 27.1 and the iOS 27.1 SDK, and checked in the Duo simulator on the outer display, the inner display open, and the inner display partially folded, in each rotation.
+- [ ] iPhone Duo screenshots uploaded in App Store Connect (accepted since 5 October 2026, they earn the optimized for iPhone Duo badge). From April 2027 they are required for any app using the iOS 27.1 SDK or later (APPLE-IPHONE-DUO-SCREENSHOTS-REQ).
- [ ] iPhone Duo layout. Layout comes from size classes and scene bounds, never `userInterfaceIdiom`, `UIInterfaceOrientation`, or fixed screen sizes. Custom views stay clear of reserved regions (cameras and the fold).
- [ ] iPhone Duo bars. Navigation bars, toolbars, and tab bars come from the system navigation containers, and every toolbar item has both an icon and a title so it can present vertically.
- [ ] The build meets the SDK floor. the 26 SDKs today, the 27 SDKs from April 2027.
@@ -95,8 +96,9 @@ Passing App Review does not make an app EU-legal. The full hard rules and source
- [ ] A short AI-literacy record exists for the team building or operating the AI feature (Article 4, live since 2 February 2025).
- [ ] No prohibited AI practice ships (manipulation, banned emotion inference, biometric categorisation) (Article 5, live since 2 February 2025).
- [ ] Personal data shared with a third-party AI has a consent modal naming the provider and data types, shown before data leaves the device (Apple Guideline 5.1.2(i), 13 November 2025).
-- [ ] The app meets EN 301 549 and WCAG 2.1 AA and publishes an accessibility statement (European Accessibility Act, in force 28 June 2025). VoiceOver labels, Dynamic Type, contrast, and Reduce Motion are covered.
-- [ ] If the app promotes external offers in the EU, the external-purchase entitlement is declared, every external link calls the disclosure sheet, IAP and external offers are not mixed on one storefront, and reporting is wired (DMA).
+- [ ] The app meets EN 301 549 and WCAG 2.1 AA and publishes its Annex V accessibility information in the terms and conditions or an equivalent document (European Accessibility Act, Directive (EU) 2019/882 Article 13(2), in force 28 June 2025). VoiceOver labels, Dynamic Type, contrast, and Reduce Motion are covered.
+- [ ] If the app offers alternative payments or out-of-app offers in the EU, the StoreKit External Purchases or Offers Entitlement is declared, the disclosure sheet is wired, In-App Purchase (when offered) is shown at the same time and at least as prominently, the chosen options stay in place for 12 months, and monthly reporting is wired (DMA, Attachment 14 terms from 1 October 2026).
+- [ ] Minors are protected on EU alternative payments. Kids category apps and users under the storefront's parental-consent age (13, or higher where set) get alternative processing only behind a parental gate. A Kids category app cannot offer an out-of-app purchase on a website, and users under that age see no out-of-app offers at all. Older minors get both only behind a parental gate.
## Global specific (USA and other markets, if the app reaches those users)
@@ -146,6 +148,7 @@ Cross-cutting.
- [ ] A UGC or social app has a content filter, in-app report and block, published contact, and 24-hour remove-and-eject (Apple 1.2), plus the Google Play Child Safety Standards items for the Social and Dating categories.
- [ ] Account-creating app has both an in-app account-and-data deletion flow and a publicly reachable web deletion URL, declared.
- [ ] Not on the OFAC SDN list, and country availability excludes the embargoed territories.
+- [ ] Releasing in Syria. EAR jurisdiction, classification, and the license exception or license relied on are documented (15 CFR 746.9).
- [ ] Non-store card payments for real goods implement PSD2 SCA and 3D Secure in the EU or UK, store no card number, and identify the correct PCI SAQ.
## The two checks that prevent the most rejections
diff --git a/docs/REGULATORY-TIMELINE.md b/docs/REGULATORY-TIMELINE.md
index bb76433..7d0eb90 100644
--- a/docs/REGULATORY-TIMELINE.md
+++ b/docs/REGULATORY-TIMELINE.md
@@ -1,7 +1,7 @@
# Global Regulatory Compliance Timeline
This document compiles every registered global regulatory deadline tracking regional, national, and platform requirements.
-Last compiled: 2026-09-30 08:33:45 UTC
+Last compiled: 2026-10-15 13:24:30 UTC
## Active and Approaching Compliance Warnings
@@ -9,71 +9,82 @@ Last compiled: 2026-09-30 08:33:45 UTC
| Priority | Jurisdiction | Law | Requirement | Effective Date | Grace Period | Mandatory Date | Enforcement Date | Overdue Days | Affected Sections |
|---|---|---|---|---|---|---|---|---|---|
-| CRITICAL | Illinois (USA State) | Biometric Information Privacy Act (BIPA), 740 ILCS 14 | Written notice and release before collecting biometric identifiers, public retention schedule, destruction within 3 years, and no sale. | 2008-06-01 | none | 2008-06-01 | 2008-06-01 | 6695 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/rules/privacy.md |
-| HIGH | United Kingdom (UK) | ICO Age Appropriate Design Code (Children's Code) | High privacy by default, data minimisation, geolocation off, profiling off by default, and a mandatory DPIA. | 2020-09-02 | 12 months | 2021-09-02 | 2021-09-02 | 1854 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
-| HIGH | South Korea | Telecommunications Business Act | Approved billing providers, 26% commission, com.apple.developer.storekit.external-purchase entitlement, South Korea-only binary, modal sheet, reporting. | 2022-03-15 | none | 2022-03-15 | 2022-03-15 | 1660 days | docs/GLOBAL-REGULATORY-2026.md section 3.5, references/rules/payments.md |
-| HIGH | European Union (EU) | EU Digital Markets Act (DMA) | External purchase links and alternative payments (com.apple.developer.storekit.external-purchase-link entitlement, custom link sheet, CTC 5% reporting). | 2024-03-07 | none | 2024-03-07 | 2024-03-07 | 937 days | docs/EU-REGULATORY-2026.md section 2 |
-| CRITICAL | China | Mobile App Filing with the MIIT (ICP Extension) | Mandatory Chinese MIIT app filing, local partner/entity, real-name, PIPL privacy, data localization, Banhao license for games. | 2023-09-01 | 7 months | 2024-03-31 | 2024-03-31 | 913 days | docs/GLOBAL-REGULATORY-2026.md section 3.9, references/rules/metadata.md |
-| HIGH | United States (Federal) | FTC Health Breach Notification Rule, 16 CFR Part 318 | 2024 Final Rule compliance (unauthorized sharing of health/sensitive data with advertisers treated as breach, mandatory 60-day notice). | 2024-06-25 | none | 2024-06-25 | 2024-06-25 | 827 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/guidelines/by-app-type/health-fitness-and-medical.md |
-| HIGH | European Union (EU) | General Product Safety Regulation (GPSR), Regulation (EU) 2023/988 | Display manufacturer identity, electronic and postal contact details, and product safety warnings on the online interface for consumer products. | 2023-06-12 | 18 months | 2024-12-13 | 2024-12-13 | 656 days | docs/REGULATORY-GAP-REPORT-2026.md section 1, references/rules/safety.md |
-| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 4 AI Literacy. Providers and deployers must take measures to ensure a sufficient level of AI literacy, proportionate to context. A written policy, induction, and log are pragmatic evidence, not a stated legal mandate. | 2024-08-01 | 6 months | 2025-02-02 | 2025-02-02 | 605 days | docs/EU-REGULATORY-2026.md section 1.3, references/guidelines/by-app-type/ai-and-generative-apps.md |
-| CRITICAL | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 5 Prohibited Practices (ban on subliminal manipulation, child exploitation, social scoring, biometric trait categorization, etc.). | 2024-08-01 | 6 months | 2025-02-02 | 2025-02-02 | 605 days | docs/EU-REGULATORY-2026.md section 1.4, references/guidelines/by-app-type/ai-and-generative-apps.md |
-| CRITICAL | European Union (EU) | EU Digital Services Act (DSA) | Trader status declaration and verification (D-U-N-S, phone, email publish, 2FA verified) or app removal from EU storefront. | 2024-02-17 | 12 months | 2025-02-17 | 2025-02-17 | 590 days | docs/EU-REGULATORY-2026.md section 3, references/rules/metadata.md |
-| CRITICAL | Google Play (Global) | Google Play Child Safety Standards Policy | Publish CSAE standards on globally reachable web page, in-app feedback, CSAM response protocol, named child-safety contact. | 2025-03-19 | none | 2025-03-19 | 2025-03-19 | 560 days | docs/PLATFORM-MECHANICS-2026.md section 3.2, references/rules/android.md |
-| CRITICAL | Google Play (Global) | Google Play Photo and Video Permissions Policy | Broad-access READ_MEDIA_IMAGES/READ_MEDIA_VIDEO restricted to broad-access apps; others must use Android Photo Picker. | 2025-05-28 | none | 2025-05-28 | 2025-05-28 | 490 days | docs/PLATFORM-MECHANICS-2026.md section 2.9, references/rules/android.md |
-| HIGH | European Union (EU) | European Accessibility Act (EAA), Directive (EU) 2019/882 | Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and published accessibility statement. | 2022-06-28 | 36 months | 2025-06-28 | 2025-06-28 | 459 days | docs/EU-REGULATORY-2026.md section 4, references/rules/design.md |
-| CRITICAL | United Kingdom (UK) | UK Online Safety Act 2023 | Highly Effective Age Assurance methods (facial age estimation, open banking, credit-card checks) to protect children from harmful content. | 2025-07-25 | none | 2025-07-25 | 2025-07-25 | 432 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/safety.md |
-| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | GPAI-model obligations, governance, and penalties (Articles 99 and 100). | 2024-08-01 | 12 months | 2025-08-02 | 2025-08-02 | 424 days | docs/EU-REGULATORY-2026.md section 1.1, section 1.6 |
-| CRITICAL | Google Play (Global) | Google Play Target API Requirement | New apps and updates must target API level 35 (Android 15) or higher, and existing target API 34+. | 2025-08-31 | none | 2025-08-31 | 2025-08-31 | 395 days | docs/PLATFORM-MECHANICS-2026.md section 2.5, references/rules/android.md |
-| MEDIUM | European Union (EU) | EU Data Act, Regulation (EU) 2023/2854 | Core data access-by-design obligations when apps interact with connected products and wearables. | 2024-01-11 | 20 months | 2025-09-12 | 2025-09-12 | 383 days | docs/EU-REGULATORY-2026.md section 5 |
-| CRITICAL | Australia | Online Safety Amendment (Social Media Minimum Age) Act 2024 | Stop under-16s holding accounts on social media via robust age assurance; ringfence and destroy age data. | 2024-12-10 | 12 months | 2025-12-10 | 2025-12-10 | 294 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/safety.md |
-| CRITICAL | Texas (USA State) | Texas SB 2420 (App Store Accountability Act) | Age assurance and verifiable parental consent for minors on downloads, purchases, and major updates, delete age data, request age category. Statutory effective date 1 January 2026. Preliminary injunctions of 23 December 2025 were stayed by the Fifth Circuit on 4 June 2026 and the Supreme Court declined to vacate the stay on 6 July 2026, so the law is in force while the merits appeal is pending. | 2026-01-01 | none | 2026-01-01 | 2026-06-04 | 272 days | docs/GLOBAL-REGULATORY-2026.md section 1, section 2.2, references/rules/privacy.md |
-| HIGH | California (USA State) | California CPRA (CPPA 2026 Regulations) | Honoring Global Privacy Control (GPC), privacy policy/notice at collection, opt-out of sale/sharing/profiling, and sensitive personal info limits. | 2026-01-01 | automated decision-making from 2027-04-01; cybersecurity audits from 2028-04-01 | 2026-01-01 | 2026-01-01 | 272 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/rules/privacy.md |
-| CRITICAL | Apple App Store (Global) | Apple App Store Review Guidelines (Guideline 2.3.6) | Every app must answer the updated age-rating questionnaire (13+, 16+, 18+ tiers, UGC/ Livestream indicators) or be blocked from updates. | 2025-07-24 | 6 months | 2026-01-31 | 2026-01-31 | 242 days | docs/EU-REGULATORY-2026.md section 6, references/rules/metadata.md |
-| CRITICAL | Apple App Store (Brazil, Australia, Singapore) | Apple App Store Region Age Requirements | Blocks users in Brazil, Australia, and Singapore from downloading apps rated 18-plus unless age confirmed through reasonable methods. | 2026-02-24 | none | 2026-02-24 | 2026-02-24 | 218 days | docs/GLOBAL-REGULATORY-2026.md section 1, references/rules/privacy.md |
-| HIGH | United States (Federal) | FTC Enforcement Policy Statement Promoting the Adoption of Age-Verification Technology under the COPPA Rule (25 February 2026) | A general-audience or mixed-audience app may collect age data for age verification without COPPA enforcement risk only if it uses the data solely for age determination, minimises retention, vets third parties, notices parents and children, and secures the data. In force until final COPPA rule amendments are published or the statement is withdrawn. | 2026-02-25 | none | 2026-02-25 | 2026-02-25 | 217 days | docs/GLOBAL-REGULATORY-2026.md section 2.1, references/guidelines/by-app-type/kids-category-and-families.md |
-| CRITICAL | Brazil | Digital ECA (Law 15,211/2025) | Accepted age verification (document check, facial estimation, CPF check); self-declaration check-box is prohibited. | 2025-09-17 | 6 months | 2026-03-17 | 2026-03-17 | 197 days | docs/GLOBAL-REGULATORY-2026.md section 3.3, references/rules/privacy.md |
-| CRITICAL | Brazil | Decreto n. 12.880 of 18 March 2026, Articles 21 and 25, regulating the Digital ECA | App stores and operating systems supply a free age signal, request age at account creation, verify it by an ANPD-approved method, allow contestation, seek guardian authorisation, and show the age rating before download. Stores must block gambling and lottery apps and any app lacking an age-verification solution. | 2026-03-18 | none | 2026-03-18 | 2026-03-18 | 196 days | docs/GLOBAL-REGULATORY-2026.md section 3.3, references/rules/privacy.md |
-| CRITICAL | Singapore | IMDA Code of Practice for Online Safety for App Distribution Services | App-store age assurance (screen and stop users under 18 from downloading age-inappropriate apps), age-assurance data destroyed. This is the age-assurance bite date. The Code of Practice for Online Safety for App Distribution Services itself commenced 31 March 2025. | 2026-04-01 | none | 2026-04-01 | 2026-04-01 | 182 days | docs/GLOBAL-REGULATORY-2026.md section 3.7, references/rules/privacy.md |
-| CRITICAL | United States (Federal) | Children's Online Privacy Protection Act (COPPA), 16 CFR Part 312 | Amended COPPA Rule compliance (biometric identifiers added to PII, separate opt-in consent for third-party disclosure/targeted-ads, written retention policy, written info-security program). The section 312.11 carve-outs are earlier dates (90 days and six months after the 22 April 2025 publication) and bind FTC-approved COPPA Safe Harbor programs only, not app developers. | 2025-06-23 | 10 months | 2026-04-22 | 2026-04-22 | 161 days | docs/GLOBAL-REGULATORY-2026.md section 2.1, references/guidelines/by-app-type/kids-category-and-families.md |
-| CRITICAL | Apple App Store (Global) | Apple App Store Submission Requirements | From 28 April 2026 apps uploaded to App Store Connect must be built with the iOS 26 and iPadOS 26 SDK or later (and the matching watchOS 26, tvOS 26, visionOS 26 SDKs). Apple states the requirement in SDK terms, not Xcode terms, and macOS is not in Apple's list. Age assurance features additionally require the iOS 26.2 SDK with Xcode 26.2 (17C52) or later. | 2026-02-03 | 2 months | 2026-04-28 | 2026-04-28 | 155 days | docs/EU-REGULATORY-2026.md section 6, docs/PLATFORM-MECHANICS-2026.md section 1.6 |
-| HIGH | United Kingdom (UK) | ICO final Guidance on Storage and Access Technologies (29 April 2026), PECR regulation 6 with the DUAA Schedule A1 exemptions and the uplifted PECR penalty (17.5 million pounds or 4 percent of turnover) | Re-audit every SDK, tracking pixel, and device-fingerprinting call against the guidance, not only cookies. A consent breach now carries the UK GDPR scale fine. | 2026-04-29 | none | 2026-04-29 | 2026-04-29 | 154 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
-| CRITICAL | United States (Federal) | TAKE IT DOWN Act, Pub. L. 119-12 | Covered platforms run a clear and conspicuous non-consensual intimate imagery notice-and-removal process and remove reported content, with known identical copies, within 48 hours. FTC enforcement began 19 May 2026. | 2026-05-19 | none | 2026-05-19 | 2026-05-19 | 134 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/rules/safety.md |
-| HIGH | Apple App Store (Australia, Vietnam) | App Store regional age rating changes. Australia 15+ removed, Vietnam Decree 147 Article 38 region-specific rating (Apple Developer news yrrb45pw) | From 18 June 2026 the 15+ rating is no longer available in Australia (affected apps move to 16+), and apps available in Vietnam require a region-specific age rating aligned with Decree 147 Article 38. Review your App Store Connect age rating per storefront. | 2026-05-21 | until 18 June 2026 | 2026-06-18 | 2026-06-18 | 104 days | docs/GLOBAL-REGULATORY-2026.md sections 3.2 and 3.10 |
-| HIGH | European Union (EU) | Distance Marketing of Financial Services, Directive (EU) 2023/2673 | Prominent, easily accessible 'withdrawal button' or 'withdrawal function' on the online interface (including apps) to withdraw from contracts. | 2023-11-28 | 30 months | 2026-06-19 | 2026-06-19 | 103 days | docs/EU-REGULATORY-2026.md section 5, references/rules/payments.md |
-| MEDIUM | United Kingdom (UK) | Data (Use and Access) Act 2025 section 103 and Schedule 10, commenced by SI 2026/82 regulation 3 | Operate a data-protection complaints process. Acknowledge a data subject complaint within 30 days and respond without undue delay. | 2026-06-19 | none | 2026-06-19 | 2026-06-19 | 103 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
-| HIGH | Singapore | Online Safety (Relief and Accountability) Act 2025, partial commencement | Act on notice from the Online Safety Commission as a platform to address the five priority harms. Further harm categories follow progressively with no published date. | 2026-06-29 | none | 2026-06-29 | 2026-06-29 | 93 days | docs/GLOBAL-REGULATORY-2026.md section 3.7 |
-| CRITICAL | Apple App Store (Brazil) | Apple Developer Program License Agreement Attachment 12, Brazil alternative distribution under the CADE decision (Apple Developer news dhwadr2x and umq9wxmm) | By 6 July 2026 all Apple Developer Program members had to accept the updated ADPLA. From iOS 26.5 developers may distribute on alternative marketplaces, operate marketplaces, and process payments for digital goods outside Apple In-App Purchase in Brazil. Unaccepted agreements block new submissions. | 2026-06-18 | until 6 July 2026 | 2026-07-06 | 2026-07-06 | 86 days | docs/GLOBAL-REGULATORY-2026.md section 3.3 |
-| CRITICAL | China | Interim Measures for AI Anthropomorphic Interactive Services, CAC Order No. 21 | Identify minor users, switch them into minors mode automatically, obtain guardian consent under 14, and never offer virtual companion or virtual kin services to a minor. Any chat, companion, or roleplay app shipping in China is in scope. | 2026-07-15 | none | 2026-07-15 | 2026-07-15 | 77 days | docs/GLOBAL-REGULATORY-2026.md section 3.9, references/guidelines/by-app-type/ai-and-generative-apps.md |
-| HIGH | Google Play (United States) | Play Catalog Access Program (Play Console Help answers 17117200 and 15582165) | From 22 July 2026 registered third-party US Android app stores can access the Play catalog and list your app by default. Opt out in Play Console under Settings, Catalog Settings, if you do not want distribution through third-party stores. | 2026-07-22 | none | 2026-07-22 | 2026-07-22 | 70 days | docs/GOOGLE-PLAY.md 2026 policy rounds |
-| CRITICAL | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 50 Transparency Obligations (AI-interaction disclosure, synthetic content marking, and deepfake disclosure). | 2024-08-01 | 24 months | 2026-08-02 | 2026-08-02 | 59 days | docs/EU-REGULATORY-2026.md section 1.2, references/guidelines/by-app-type/ai-and-generative-apps.md |
-| HIGH | Google Play (Global) | Google Play chargeback cost responsibility update (Play Console Help answer 17068375) | For orders placed after 3 August 2026 the developer bears the purchase price less the service fee plus the financial institution's chargeback fee. Google Play covers only its service fee. Handle PendingRefundReviewNotification and call the Review Refund API within 24 hours to contest illegitimate disputes. | 2026-08-03 | none | 2026-08-03 | 2026-08-03 | 58 days | docs/GOOGLE-PLAY.md Payments rows, references/rules/payments.md |
-| HIGH | European Union (EU) | e-Evidence Package, Regulation (EU) 2023/1543 | Cross-border law enforcement direct electronic evidence access (10 days response timeline, and a critical 8-hour emergency timeline). | 2023-08-18 | 36 months | 2026-08-18 | 2026-08-18 | 43 days | docs/EU-REGULATORY-2026.md section 5, references/rules/privacy.md |
-| CRITICAL | Google Play (Global) | Age-Restricted Content, Families, and Child Safety Standards policy expansion to anonymous and random chat apps (Play Console Help answers 17036597, 17122218, 14747720) | Apps whose core function is random or anonymous chat with strangers must use Play Console tools to block minors, may not target children under Families, and are in scope of the Child Safety Standards policy (published CSAE standards, in-app reporting, CSAM removal, child-safety contact). | 2026-08-26 | none | 2026-08-26 | 2026-08-26 | 35 days | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/safety.md |
-| CRITICAL | Google Play (Global) | Google Play Billing Policy | All new apps and updates must use Play Billing Library version 8 or later from 31 August 2026, with an extension available to 1 November 2026. This is a publishing gate, already-published v7 binaries keep transacting until the 2027 all-apps deadline. | 2026-05-01 | 3 months | 2026-08-31 | 2026-08-31 | 30 days | docs/PLATFORM-MECHANICS-2026.md section 2.4, references/rules/payments.md |
-| HIGH | Google Play (Global) | Google Play Target API Requirement | New apps and updates must target API level 36 (Android 16) or higher from 31 August 2026, with a Play Console extension request available to 1 November 2026. Wear OS and Android Automotive OS apps must target API 35 or higher, Android TV and Android XR apps API 34 or higher. Existing apps must target API 35 or higher to stay available to new users on newer devices. | 2026-08-31 | none | 2026-08-31 | 2026-08-31 | 30 days | docs/PLATFORM-MECHANICS-2026.md section 2.5, references/rules/android.md |
-| CRITICAL | Apple App Store (Global) | App Store Connect social media capability declaration (Apple Developer news 0d2gpmml and tlur8uvi) | Apple states Starting September 2026 (no exact day published) you must indicate whether your app or game includes social media capabilities to submit a new version or update, or to notarize for alternative marketplaces. Declaring social media places the app in the Time Allowance category for Social Media with a minimum 13+ rating, and the Declared Age Range API is required to serve under-13 users. | 2026-09-01 | none | 2026-09-01 | 2026-09-01 | 29 days | docs/APPLE.md Section 2 and the 2026 changes list, references/rules/metadata.md |
-| CRITICAL | Australia | App Distribution Services Online Safety Code (Class 1C and Class 2 Material), Schedule 7 of the Consolidated Industry Codes, registered 9 September 2025 | App stores apply age assurance and access controls before permitting the download or purchase of adult apps, six months after the Code commenced. The Head Terms working-towards grace period ends and the initial risk assessment is due the same day. Read from a Wayback capture of eSafety pages last updated 19 May 2026 because esafety.gov.au was unreachable, re-confirm on the live register. | 2026-03-09 | none | 2026-09-09 | 2026-09-09 | 21 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/safety.md |
-| MEDIUM | European Union (EU) | Cyber Resilience Act, Regulation (EU) 2024/2847 | Active vulnerability reporting and security incident notification obligations. | 2024-12-11 | 21 months | 2026-09-11 | 2026-09-11 | 19 days | docs/EU-REGULATORY-2026.md section 5 |
-| HIGH | South Korea | Personal Information Protection Act amendment, Act No. 21445 | Name the CEO and representative as the final accountable parties, seat a board-approved chief privacy officer at qualifying scale, and absorb punitive surcharges plus widened breach notification. | 2026-09-11 | none | 2026-09-11 | 2026-09-11 | 19 days | docs/GLOBAL-REGULATORY-2026.md section 3.5, references/rules/privacy.md |
-| MEDIUM | European Union (EU) | EU Data Act, Regulation (EU) 2023/2854 | Access-by-design technical implementation for connected wearables and devices. This is the Article 3(1) access-by-design duty for connected products, not cloud switching. Switching charges fall to zero on 12 January 2027 under Article 29(1). | 2024-01-11 | 32 months | 2026-09-12 | 2026-09-12 | 18 days | docs/EU-REGULATORY-2026.md section 5 |
+| CRITICAL | Illinois (USA State) | Biometric Information Privacy Act (BIPA), 740 ILCS 14 | Written notice and release before collecting biometric identifiers, public retention schedule, destruction within 3 years, and no sale. | 2008-06-01 | none | 2008-06-01 | 2008-06-01 | 6710 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/rules/privacy.md |
+| HIGH | United Kingdom (UK) | ICO Age Appropriate Design Code (Children's Code) | High privacy by default, data minimisation, geolocation off, profiling off by default, and a mandatory DPIA. | 2020-09-02 | 12 months | 2021-09-02 | 2021-09-02 | 1869 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
+| HIGH | South Korea | Telecommunications Business Act | Approved billing providers, 26% commission, com.apple.developer.storekit.external-purchase entitlement, South Korea-only binary, modal sheet, reporting. | 2022-03-15 | none | 2022-03-15 | 2022-03-15 | 1675 days | docs/GLOBAL-REGULATORY-2026.md section 3.5, references/rules/payments.md |
+| HIGH | European Union (EU) | EU Digital Markets Act (DMA) | Alternative payments and out-of-app offers (StoreKit External Purchases or Offers Entitlement, ExternalPurchaseCustomLink disclosure sheet, In-App Purchase at equal prominence when offered, parental gates for minors, options kept 12 months, monthly transaction reporting). | 2024-03-07 | none | 2024-03-07 | 2024-03-07 | 952 days | docs/EU-REGULATORY-2026.md section 2 |
+| CRITICAL | China | Mobile App Filing with the MIIT (ICP Extension) | Mandatory Chinese MIIT app filing, local partner/entity, real-name, PIPL privacy, data localization, Banhao license for games. | 2023-09-01 | 7 months | 2024-03-31 | 2024-03-31 | 928 days | docs/GLOBAL-REGULATORY-2026.md section 3.9, references/rules/metadata.md |
+| HIGH | United States (Federal) | FTC Health Breach Notification Rule, 16 CFR Part 318 | 2024 Final Rule compliance (unauthorized sharing of health/sensitive data with advertisers treated as breach, mandatory 60-day notice). | 2024-06-25 | none | 2024-06-25 | 2024-06-25 | 842 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/guidelines/by-app-type/health-fitness-and-medical.md |
+| HIGH | European Union (EU) | General Product Safety Regulation (GPSR), Regulation (EU) 2023/988 | Display manufacturer identity, electronic and postal contact details, and product safety warnings on the online interface for consumer products. | 2023-06-12 | 18 months | 2024-12-13 | 2024-12-13 | 671 days | docs/REGULATORY-GAP-REPORT-2026.md section 1, references/rules/safety.md |
+| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 4 AI Literacy. Providers and deployers must take measures to ensure a sufficient level of AI literacy, proportionate to context. A written policy, induction, and log are pragmatic evidence, not a stated legal mandate. | 2024-08-01 | 6 months | 2025-02-02 | 2025-02-02 | 620 days | docs/EU-REGULATORY-2026.md section 1.3, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| CRITICAL | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 5 Prohibited Practices (ban on subliminal manipulation, child exploitation, social scoring, biometric trait categorization, etc.). | 2024-08-01 | 6 months | 2025-02-02 | 2025-02-02 | 620 days | docs/EU-REGULATORY-2026.md section 1.4, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| CRITICAL | European Union (EU) | EU Digital Services Act (DSA) | Trader status declaration and verification (D-U-N-S, phone, email publish, 2FA verified) or app removal from EU storefront. | 2024-02-17 | 12 months | 2025-02-17 | 2025-02-17 | 605 days | docs/EU-REGULATORY-2026.md section 3, references/rules/metadata.md |
+| CRITICAL | Google Play (Global) | Google Play Child Safety Standards Policy | Publish CSAE standards on globally reachable web page, in-app feedback, CSAM response protocol, named child-safety contact. | 2025-03-19 | none | 2025-03-19 | 2025-03-19 | 575 days | docs/PLATFORM-MECHANICS-2026.md section 3.2, references/rules/android.md |
+| CRITICAL | Google Play (Global) | Google Play Photo and Video Permissions Policy | Broad-access READ_MEDIA_IMAGES/READ_MEDIA_VIDEO restricted to broad-access apps; others must use Android Photo Picker. | 2025-05-28 | none | 2025-05-28 | 2025-05-28 | 505 days | docs/PLATFORM-MECHANICS-2026.md section 2.9, references/rules/android.md |
+| HIGH | European Union (EU) | European Accessibility Act (EAA), Directive (EU) 2019/882 | Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and Annex V accessibility information published in the terms and conditions or an equivalent document (Article 13(2)). | 2022-06-28 | 36 months | 2025-06-28 | 2025-06-28 | 474 days | docs/EU-REGULATORY-2026.md section 4, references/rules/design.md |
+| CRITICAL | United Kingdom (UK) | UK Online Safety Act 2023 | Highly Effective Age Assurance methods (facial age estimation, open banking, credit-card checks) to protect children from harmful content. | 2025-07-25 | none | 2025-07-25 | 2025-07-25 | 447 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/safety.md |
+| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | GPAI-model obligations, governance, and penalties (Articles 99 and 100). | 2024-08-01 | 12 months | 2025-08-02 | 2025-08-02 | 439 days | docs/EU-REGULATORY-2026.md section 1.1, section 1.6 |
+| CRITICAL | Google Play (Global) | Google Play Target API Requirement | New apps and updates must target API level 35 (Android 15) or higher, and existing target API 34+. | 2025-08-31 | none | 2025-08-31 | 2025-08-31 | 410 days | docs/PLATFORM-MECHANICS-2026.md section 2.5, references/rules/android.md |
+| MEDIUM | European Union (EU) | EU Data Act, Regulation (EU) 2023/2854 | Core data access-by-design obligations when apps interact with connected products and wearables. | 2024-01-11 | 20 months | 2025-09-12 | 2025-09-12 | 398 days | docs/EU-REGULATORY-2026.md section 5 |
+| CRITICAL | Australia | Online Safety Amendment (Social Media Minimum Age) Act 2024 | Stop under-16s holding accounts on social media via robust age assurance; ringfence and destroy age data. | 2024-12-10 | 12 months | 2025-12-10 | 2025-12-10 | 309 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/safety.md |
+| CRITICAL | Texas (USA State) | Texas SB 2420 (App Store Accountability Act) | Age assurance and verifiable parental consent for minors on downloads, purchases, and major updates, delete age data, request age category. Statutory effective date 1 January 2026. Preliminary injunctions of 23 December 2025 were stayed by the Fifth Circuit on 4 June 2026 and the Supreme Court declined to vacate the stay on 6 July 2026, so the law is in force while the merits appeal is pending. | 2026-01-01 | none | 2026-01-01 | 2026-06-04 | 287 days | docs/GLOBAL-REGULATORY-2026.md section 1, section 2.2, references/rules/privacy.md |
+| HIGH | California (USA State) | California CPRA (CPPA 2026 Regulations) | Honoring Global Privacy Control (GPC), privacy policy/notice at collection, opt-out of sale/sharing/profiling, and sensitive personal info limits. | 2026-01-01 | automated decision-making from 2027-04-01; cybersecurity audits from 2028-04-01 | 2026-01-01 | 2026-01-01 | 287 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/rules/privacy.md |
+| CRITICAL | Apple App Store (Global) | Apple App Store Review Guidelines (Guideline 2.3.6) | Every app must answer the updated age-rating questionnaire (13+, 16+, 18+ tiers, UGC/ Livestream indicators) or be blocked from updates. | 2025-07-24 | 6 months | 2026-01-31 | 2026-01-31 | 257 days | docs/EU-REGULATORY-2026.md section 6, references/rules/metadata.md |
+| CRITICAL | Apple App Store (Brazil, Australia, Singapore) | Apple App Store Region Age Requirements | Blocks users in Brazil, Australia, and Singapore from downloading apps rated 18-plus unless age confirmed through reasonable methods. | 2026-02-24 | none | 2026-02-24 | 2026-02-24 | 233 days | docs/GLOBAL-REGULATORY-2026.md section 1, references/rules/privacy.md |
+| HIGH | United States (Federal) | FTC Enforcement Policy Statement Promoting the Adoption of Age-Verification Technology under the COPPA Rule (25 February 2026) | A general-audience or mixed-audience app may collect age data for age verification without COPPA enforcement risk only if it uses the data solely for age determination, minimises retention, vets third parties, notices parents and children, and secures the data. In force until final COPPA rule amendments are published or the statement is withdrawn. | 2026-02-25 | none | 2026-02-25 | 2026-02-25 | 232 days | docs/GLOBAL-REGULATORY-2026.md section 2.1, references/guidelines/by-app-type/kids-category-and-families.md |
+| CRITICAL | Brazil | Digital ECA (Law 15,211/2025) | Accepted age verification (document check, facial estimation, CPF check); self-declaration check-box is prohibited. | 2025-09-17 | 6 months | 2026-03-17 | 2026-03-17 | 212 days | docs/GLOBAL-REGULATORY-2026.md section 3.3, references/rules/privacy.md |
+| CRITICAL | Brazil | Decreto n. 12.880 of 18 March 2026, Articles 21 and 25, regulating the Digital ECA | App stores and operating systems supply a free age signal, request age at account creation, verify it by an ANPD-approved method, allow contestation, seek guardian authorisation, and show the age rating before download. Stores must block gambling and lottery apps and any app lacking an age-verification solution. | 2026-03-18 | none | 2026-03-18 | 2026-03-18 | 211 days | docs/GLOBAL-REGULATORY-2026.md section 3.3, references/rules/privacy.md |
+| CRITICAL | Singapore | IMDA Code of Practice for Online Safety for App Distribution Services | App-store age assurance (screen and stop users under 18 from downloading age-inappropriate apps), age-assurance data destroyed. This is the age-assurance bite date. The Code of Practice for Online Safety for App Distribution Services itself commenced 31 March 2025. | 2026-04-01 | none | 2026-04-01 | 2026-04-01 | 197 days | docs/GLOBAL-REGULATORY-2026.md section 3.7, references/rules/privacy.md |
+| CRITICAL | United States (Federal) | Children's Online Privacy Protection Act (COPPA), 16 CFR Part 312 | Amended COPPA Rule compliance (biometric identifiers added to PII, separate opt-in consent for third-party disclosure/targeted-ads, written retention policy, written info-security program). The section 312.11 carve-outs are earlier dates (90 days and six months after the 22 April 2025 publication) and bind FTC-approved COPPA Safe Harbor programs only, not app developers. | 2025-06-23 | 10 months | 2026-04-22 | 2026-04-22 | 176 days | docs/GLOBAL-REGULATORY-2026.md section 2.1, references/guidelines/by-app-type/kids-category-and-families.md |
+| CRITICAL | Apple App Store (Global) | Apple App Store Submission Requirements | From 28 April 2026 apps uploaded to App Store Connect must be built with the iOS 26 and iPadOS 26 SDK or later (and the matching watchOS 26, tvOS 26, visionOS 26 SDKs). Apple states the requirement in SDK terms, not Xcode terms, and macOS is not in Apple's list. Age assurance features additionally require the iOS 26.2 SDK with Xcode 26.2 (17C52) or later. | 2026-02-03 | 2 months | 2026-04-28 | 2026-04-28 | 170 days | docs/EU-REGULATORY-2026.md section 6, docs/PLATFORM-MECHANICS-2026.md section 1.6 |
+| HIGH | United Kingdom (UK) | ICO final Guidance on Storage and Access Technologies (29 April 2026), PECR regulation 6 with the DUAA Schedule A1 exemptions and the uplifted PECR penalty (17.5 million pounds or 4 percent of turnover) | Re-audit every SDK, tracking pixel, and device-fingerprinting call against the guidance, not only cookies. A consent breach now carries the UK GDPR scale fine. | 2026-04-29 | none | 2026-04-29 | 2026-04-29 | 169 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
+| CRITICAL | United States (Federal) | TAKE IT DOWN Act, Pub. L. 119-12 | Covered platforms run a clear and conspicuous non-consensual intimate imagery notice-and-removal process and remove reported content, with known identical copies, within 48 hours. FTC enforcement began 19 May 2026. | 2026-05-19 | none | 2026-05-19 | 2026-05-19 | 149 days | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/rules/safety.md |
+| HIGH | Apple App Store (Australia, Vietnam) | App Store regional age rating changes. Australia 15+ removed, Vietnam Decree 147 Article 38 region-specific rating (Apple Developer news yrrb45pw) | From 18 June 2026 the 15+ rating is no longer available in Australia (affected apps move to 16+), and apps available in Vietnam require a region-specific age rating aligned with Decree 147 Article 38. Review your App Store Connect age rating per storefront. | 2026-05-21 | until 18 June 2026 | 2026-06-18 | 2026-06-18 | 119 days | docs/GLOBAL-REGULATORY-2026.md sections 3.2 and 3.10 |
+| HIGH | European Union (EU) | Distance Marketing of Financial Services, Directive (EU) 2023/2673 | Prominent, easily accessible 'withdrawal button' or 'withdrawal function' on the online interface (including apps) to withdraw from contracts. | 2023-11-28 | 30 months | 2026-06-19 | 2026-06-19 | 118 days | docs/EU-REGULATORY-2026.md section 5, references/rules/payments.md |
+| MEDIUM | United Kingdom (UK) | Data (Use and Access) Act 2025 section 103 and Schedule 10, commenced by SI 2026/82 regulation 3 | Operate a data-protection complaints process. Acknowledge a data subject complaint within 30 days and respond without undue delay. | 2026-06-19 | none | 2026-06-19 | 2026-06-19 | 118 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
+| HIGH | Singapore | Online Safety (Relief and Accountability) Act 2025, partial commencement | Act on notice from the Online Safety Commission as a platform to address the five priority harms. Further harm categories follow progressively with no published date. | 2026-06-29 | none | 2026-06-29 | 2026-06-29 | 108 days | docs/GLOBAL-REGULATORY-2026.md section 3.7 |
+| CRITICAL | Apple App Store (Brazil) | Apple Developer Program License Agreement Attachment 12, Brazil alternative distribution under the CADE decision (Apple Developer news dhwadr2x and umq9wxmm) | By 6 July 2026 all Apple Developer Program members had to accept the updated ADPLA. From iOS 26.5 developers may distribute on alternative marketplaces, operate marketplaces, and process payments for digital goods outside Apple In-App Purchase in Brazil. Unaccepted agreements block new submissions. | 2026-06-18 | until 6 July 2026 | 2026-07-06 | 2026-07-06 | 101 days | docs/GLOBAL-REGULATORY-2026.md section 3.3 |
+| CRITICAL | China | Interim Measures for AI Anthropomorphic Interactive Services, CAC Order No. 21 | Identify minor users, switch them into minors mode automatically, obtain guardian consent under 14, and never offer virtual companion or virtual kin services to a minor. Any chat, companion, or roleplay app shipping in China is in scope. | 2026-07-15 | none | 2026-07-15 | 2026-07-15 | 92 days | docs/GLOBAL-REGULATORY-2026.md section 3.9, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| HIGH | Google Play (United States) | Play Catalog Access Program (Play Console Help answers 17117200 and 15582165) | From 22 July 2026 registered third-party US Android app stores can access the Play catalog and list your app by default. Opt out in Play Console under Settings, Catalog Settings, if you do not want distribution through third-party stores. | 2026-07-22 | none | 2026-07-22 | 2026-07-22 | 85 days | docs/GOOGLE-PLAY.md 2026 policy rounds |
+| CRITICAL | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 | Article 50 Transparency Obligations (AI-interaction disclosure, synthetic content marking, and deepfake disclosure). | 2024-08-01 | 24 months | 2026-08-02 | 2026-08-02 | 74 days | docs/EU-REGULATORY-2026.md section 1.2, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| HIGH | Google Play (Global) | Google Play chargeback cost responsibility update (Play Console Help answer 17068375) | For orders placed after 3 August 2026 the developer bears the purchase price less the service fee plus the financial institution's chargeback fee. Google Play covers only its service fee. Handle PendingRefundReviewNotification and call the Review Refund API within 24 hours to contest illegitimate disputes. | 2026-08-03 | none | 2026-08-03 | 2026-08-03 | 73 days | docs/GOOGLE-PLAY.md Payments rows, references/rules/payments.md |
+| HIGH | European Union (EU) | e-Evidence Package, Regulation (EU) 2023/1543 | Cross-border law enforcement direct electronic evidence access (10 days response timeline, and a critical 8-hour emergency timeline). | 2023-08-18 | 36 months | 2026-08-18 | 2026-08-18 | 58 days | docs/EU-REGULATORY-2026.md section 5, references/rules/privacy.md |
+| CRITICAL | Google Play (Global) | Age-Restricted Content, Families, and Child Safety Standards policy expansion to anonymous and random chat apps (Play Console Help answers 17036597, 17122218, 14747720) | Apps whose core function is random or anonymous chat with strangers must use Play Console tools to block minors, may not target children under Families, and are in scope of the Child Safety Standards policy (published CSAE standards, in-app reporting, CSAM removal, child-safety contact). | 2026-08-26 | none | 2026-08-26 | 2026-08-26 | 50 days | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/safety.md |
+| CRITICAL | Google Play (Global) | Google Play Billing Policy | All new apps and updates must use Play Billing Library version 8 or later from 31 August 2026, with an extension available to 1 November 2026. This is a publishing gate, already-published v7 binaries keep transacting until the 2027 all-apps deadline. | 2026-05-01 | 3 months | 2026-08-31 | 2026-08-31 | 45 days | docs/PLATFORM-MECHANICS-2026.md section 2.4, references/rules/payments.md |
+| HIGH | Google Play (Global) | Google Play Target API Requirement | New apps and updates must target API level 36 (Android 16) or higher from 31 August 2026, with a Play Console extension request available to 1 November 2026. Wear OS and Android Automotive OS apps must target API 35 or higher, Android TV and Android XR apps API 34 or higher. Existing apps must target API 35 or higher to stay available to new users on newer devices. | 2026-08-31 | none | 2026-08-31 | 2026-08-31 | 45 days | docs/PLATFORM-MECHANICS-2026.md section 2.5, references/rules/android.md |
+| CRITICAL | Apple App Store (Global) | App Store Connect social media capability declaration (Apple Developer news 0d2gpmml and tlur8uvi) | Apple states Starting September 2026 (no exact day published) you must indicate whether your app or game includes social media capabilities to submit a new version or update, or to notarize for alternative marketplaces. Declaring social media places the app in the Time Allowance category for Social Media with a minimum 13+ rating, and the Declared Age Range API is required to serve under-13 users. | 2026-09-01 | none | 2026-09-01 | 2026-09-01 | 44 days | docs/APPLE.md Section 2 and the 2026 changes list, references/rules/metadata.md |
+| CRITICAL | Australia | App Distribution Services Online Safety Code (Class 1C and Class 2 Material), Schedule 7 of the Consolidated Industry Codes, registered 9 September 2025 | App stores apply age assurance and access controls before permitting the download or purchase of adult apps, six months after the Code commenced. The Head Terms working-towards grace period ends and the initial risk assessment is due the same day. Read from a Wayback capture of eSafety pages last updated 19 May 2026 because esafety.gov.au was unreachable, re-confirm on the live register. | 2026-03-09 | none | 2026-09-09 | 2026-09-09 | 36 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/safety.md |
+| MEDIUM | European Union (EU) | Cyber Resilience Act, Regulation (EU) 2024/2847 | Active vulnerability reporting and security incident notification obligations. | 2024-12-11 | 21 months | 2026-09-11 | 2026-09-11 | 34 days | docs/EU-REGULATORY-2026.md section 5 |
+| HIGH | South Korea | Personal Information Protection Act amendment, Act No. 21445 | Name the CEO and representative as the final accountable parties, seat a board-approved chief privacy officer at qualifying scale, and absorb punitive surcharges plus widened breach notification. | 2026-09-11 | none | 2026-09-11 | 2026-09-11 | 34 days | docs/GLOBAL-REGULATORY-2026.md section 3.5, references/rules/privacy.md |
+| MEDIUM | European Union (EU) | EU Data Act, Regulation (EU) 2023/2854 | Access-by-design technical implementation for connected wearables and devices. This is the Article 3(1) access-by-design duty for connected products, not cloud switching. Switching charges fall to zero on 12 January 2027 under Article 29(1). | 2024-01-11 | 32 months | 2026-09-12 | 2026-09-12 | 33 days | docs/EU-REGULATORY-2026.md section 5 |
+| CRITICAL | Android (Brazil, Indonesia, Singapore, Thailand) | Android Developer Verification Policy | Sideloading leg. from 30 September 2026 apps installed on certified devices in Brazil, Indonesia, Singapore, and Thailand must be registered to a verified developer identity (Android Developer Console, USD 25 for full distribution, free limited-distribution accounts up to 20 devices, D-U-N-S for organizations). Global expansion is stated only as 2027 with no exact date published. The separate Play leg (register every Play package name in Play Console by 30 September 2026, global) is GOOGLE-PLAY-APP-PACKAGE-REGISTRATION. | 2026-03-15 | 6 months | 2026-09-30 | 2026-09-30 | 15 days | docs/PLATFORM-MECHANICS-2026.md section 2.1, references/rules/android.md |
+| CRITICAL | Google Play (Global) | Play Console requirements. organization registration for financial, health, VPN, and government apps (Play Console Help answers 10788890 and 17125096) | Apps offering financial products (banking, loans, stock trading, investment funds, crypto wallets and exchanges), health apps (medical, human subjects research), apps approved to use the VpnService class, and government apps must be published from an organization account with a D-U-N-S number consistent with the Dun and Bradstreet profile. Non-compliant apps are removed. | 2026-07-15 | until 30 September 2026 | 2026-09-30 | 2026-09-30 | 15 days | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/android.md |
+| CRITICAL | Google Play (Global) | Android developer verification, Play leg. register every Play app package name in Play Console (Play Console Help answers 17125096 and 17134731) | Register your app package names via Play Console to comply with Android developer verification. This leg is global and separate from the Brazil, Indonesia, Singapore, Thailand sideloading leg. Non-registration risks global removal from Google Play. | 2026-07-15 | until 30 September 2026 | 2026-09-30 | 2026-09-30 | 15 days | docs/GOOGLE-PLAY.md 2026 policy rounds, docs/PLATFORM-MECHANICS-2026.md section 2 |
+| CRITICAL | Google Play (United States) | US alternative billing and external links program. transaction reporting and service fees (Play Console Help answer 16497028) | Developers enrolled in the US alternative billing or external links program must report transactions and successful downloads and pay the relevant Play service fee starting 1 October 2026. | 2026-10-01 | none | 2026-10-01 | 2026-10-01 | 14 days | docs/GLOBAL-REGULATORY-2026.md section 2.3, docs/GOOGLE-PLAY.md |
+| CRITICAL | European Union (EU) | Apple EU business terms update. Core Technology Commission replaces the Core Technology Fee, ADPLA Attachment 14 (Apple Developer news gmws0jgp and 0cgo95n6) | From 1 October 2026 the per-install Core Technology Fee is replaced by a 5 percent Core Technology Commission on digital transactions in apps distributed outside the App Store, the Initial Acquisition Fee and Store Services Fee are eliminated, apps may offer alternative payment options alongside Apple In-App Purchase, and marketplace and web distribution eligibility widens to seven alternative criteria. Attachment 14 of the ADPLA must be accepted. | 2026-08-18 | until 1 October 2026 | 2026-10-01 | 2026-10-01 | 14 days | docs/EU-REGULATORY-2026.md section 2.3 |
### Approaching Deadlines (Within 90 Days)
| Priority | Jurisdiction | Law | Requirement | Effective Date | Grace Period | Mandatory Date | Enforcement Date | Days Remaining | Affected Sections |
|---|---|---|---|---|---|---|---|---|---|
-| CRITICAL | Android (Brazil, Indonesia, Singapore, Thailand) | Android Developer Verification Policy | Sideloading leg. from 30 September 2026 apps installed on certified devices in Brazil, Indonesia, Singapore, and Thailand must be registered to a verified developer identity (Android Developer Console, USD 25 for full distribution, free limited-distribution accounts up to 20 devices, D-U-N-S for organizations). Global expansion is stated only as 2027 with no exact date published. The separate Play leg (register every Play package name in Play Console by 30 September 2026, global) is GOOGLE-PLAY-APP-PACKAGE-REGISTRATION. | 2026-03-15 | 6 months | 2026-09-30 | 2026-09-30 | 0 days | docs/PLATFORM-MECHANICS-2026.md section 2.1, references/rules/android.md |
-| CRITICAL | Google Play (Global) | Play Console requirements. organization registration for financial, health, VPN, and government apps (Play Console Help answers 10788890 and 17125096) | Apps offering financial products (banking, loans, stock trading, investment funds, crypto wallets and exchanges), health apps (medical, human subjects research), apps approved to use the VpnService class, and government apps must be published from an organization account with a D-U-N-S number consistent with the Dun and Bradstreet profile. Non-compliant apps are removed. | 2026-07-15 | until 30 September 2026 | 2026-09-30 | 2026-09-30 | 0 days | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/android.md |
-| CRITICAL | Google Play (Global) | Android developer verification, Play leg. register every Play app package name in Play Console (Play Console Help answers 17125096 and 17134731) | Register your app package names via Play Console to comply with Android developer verification. This leg is global and separate from the Brazil, Indonesia, Singapore, Thailand sideloading leg. Non-registration risks global removal from Google Play. | 2026-07-15 | until 30 September 2026 | 2026-09-30 | 2026-09-30 | 0 days | docs/GOOGLE-PLAY.md 2026 policy rounds, docs/PLATFORM-MECHANICS-2026.md section 2 |
-| CRITICAL | Google Play (United States) | US alternative billing and external links program. transaction reporting and service fees (Play Console Help answer 16497028) | Developers enrolled in the US alternative billing or external links program must report transactions and successful downloads and pay the relevant Play service fee starting 1 October 2026. | 2026-10-01 | none | 2026-10-01 | 2026-10-01 | 1 days | docs/GLOBAL-REGULATORY-2026.md section 2.3, docs/GOOGLE-PLAY.md |
-| CRITICAL | European Union (EU) | Apple EU business terms update. Core Technology Commission replaces the Core Technology Fee, ADPLA Attachment 14 (Apple Developer news gmws0jgp and 0cgo95n6) | From 1 October 2026 the per-install Core Technology Fee is replaced by a 5 percent Core Technology Commission on digital transactions in apps distributed outside the App Store, the Initial Acquisition Fee and Store Services Fee are eliminated, apps may offer alternative payment options alongside Apple In-App Purchase, and marketplace and web distribution eligibility widens to seven alternative criteria. Attachment 14 of the ADPLA must be accepted. | 2026-08-18 | until 1 October 2026 | 2026-10-01 | 2026-10-01 | 1 days | docs/EU-REGULATORY-2026.md section 2.3 |
-| MEDIUM | Apple App Store (Global) | Apple multiseat subscription purchases (Apple Developer news likeohx4) | Since 16 September 2026 multiseat purchases are enabled by default for subscriptions in App Store Connect. Volume Purchasing through Apple Business and Apple School Manager launches on 22 October 2026, and Group Purchases launch this winter. Before 22 October decide for each auto-renewable subscription whether organizations and groups may buy seats, and disable multiseat purchases, or limit them across the App Store, Apple Business, and Apple School Manager, where they do not fit your pricing or entitlement logic. Source https://developer.apple.com/news/?id=likeohx4 | 2026-09-16 | about 5 weeks | 2026-10-22 | 2026-10-22 | 22 days | docs/APPLE.md 2026 changes you must act on |
-| HIGH | Apple App Store (Global) | Apple iPhone Duo platform readiness | iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. App Store Connect does not accept iPhone Duo screenshots yet (Apple says later this year), so the 6.9 inch set stays required. Tracked in issue #724. Sources https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo | 2026-09-09 | about 6 weeks | 2026-10-23 | 2026-10-23 | 23 days | docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific, docs/GAP-ANALYSIS-2026-09.md open items |
-| MEDIUM | India | Digital Personal Data Protection Rules 2025, G.S.R. 846(E), rule 4 | Registered Consent Managers commence one year after Gazette publication (13 November 2025). Be ready to interoperate with a registered Consent Manager ahead of the 18-month tranche on 13 May 2027. | 2026-11-13 | none | 2026-11-13 | 2026-11-13 | 44 days | docs/GLOBAL-REGULATORY-2026.md section 3.6, references/rules/privacy.md |
-| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 as amended by Regulation (EU) 2026/1744, Article 111(4) and Article 5(1)(ba) and (bb) | Retrofit Article 50(2) machine-readable AI-content marking onto any generative audio, image, video, or text system already on the market before 2 August 2026, and stop operating any AI system whose intended or reasonably foreseeable output is non-consensual intimate imagery or child sexual abuse material. | 2026-12-02 | none | 2026-12-02 | 2026-12-02 | 63 days | docs/EU-REGULATORY-2026.md section 1.1, references/guidelines/by-app-type/ai-and-generative-apps.md |
-| MEDIUM | European Union (EU) | Product Liability Directive (EU) 2024/2853, Articles 21 and 22 | From 9 December 2026 national strict-liability law treats standalone software and app updates as a product. Anything placed on the market or put into service on or after that date falls under the new regime. | 2026-12-09 | none | 2026-12-09 | 2026-12-09 | 70 days | docs/EU-REGULATORY-2026.md section 5, references/rules/safety.md |
-| HIGH | Australia | Privacy Act 1988 APP 1.7 to 1.9, inserted by the Privacy and Other Legislation Amendment Act 2024 | From 10 December 2026 the privacy policy must state the kinds of personal information used by, and the decisions made by, automated decision-making that significantly affects rights or interests. | 2026-12-10 | none | 2026-12-10 | 2026-12-10 | 71 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/privacy.md |
-| HIGH | Australia | Children's Online Privacy Code under the Privacy Act 1988 | The Code must be finalised and registered by 10 December 2026, bringing binding children's-privacy obligations to social media, relevant electronic services, and designated internet services. | 2026-12-10 | none | 2026-12-10 | 2026-12-10 | 71 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/guidelines/by-app-type/kids-category-and-families.md |
+| MEDIUM | Apple App Store (Global) | Apple multiseat subscription purchases (Apple Developer news likeohx4) | Since 16 September 2026 multiseat purchases are enabled by default for subscriptions in App Store Connect. Volume Purchasing through Apple Business and Apple School Manager launches on 22 October 2026, and Group Purchases launch this winter. Before 22 October decide for each auto-renewable subscription whether organizations and groups may buy seats, and disable multiseat purchases, or limit them across the App Store, Apple Business, and Apple School Manager, where they do not fit your pricing or entitlement logic. Source https://developer.apple.com/news/?id=likeohx4 | 2026-09-16 | about 5 weeks | 2026-10-22 | 2026-10-22 | 7 days | docs/APPLE.md 2026 changes you must act on |
+| HIGH | Apple App Store (Global) | Apple iPhone Duo platform readiness | iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. Since 5 October 2026 App Store Connect accepts iPhone Duo optimized apps and Duo screenshots, which earn a product page badge, and from April 2027 Duo screenshots are required for apps using the iOS 27.1 SDK or later (APPLE-IPHONE-DUO-SCREENSHOTS-REQ). Tracked in issue #724. Sources https://developer.apple.com/news/?id=kkphp5qo https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo | 2026-09-09 | about 6 weeks | 2026-10-23 | 2026-10-23 | 8 days | docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific, docs/GAP-ANALYSIS-2026-09.md open items |
+| MEDIUM | India | Digital Personal Data Protection Rules 2025, G.S.R. 846(E), rule 4 | Registered Consent Managers commence one year after Gazette publication (13 November 2025). Be ready to interoperate with a registered Consent Manager ahead of the 18-month tranche on 13 May 2027. | 2026-11-13 | none | 2026-11-13 | 2026-11-13 | 29 days | docs/GLOBAL-REGULATORY-2026.md section 3.6, references/rules/privacy.md |
+| HIGH | European Union (EU) | EU AI Act, Regulation (EU) 2024/1689 as amended by Regulation (EU) 2026/1744, Article 111(4) and Article 5(1)(ba) and (bb) | Retrofit Article 50(2) machine-readable AI-content marking onto any generative audio, image, video, or text system already on the market before 2 August 2026, and stop operating any AI system whose intended or reasonably foreseeable output is non-consensual intimate imagery or child sexual abuse material. | 2026-12-02 | none | 2026-12-02 | 2026-12-02 | 48 days | docs/EU-REGULATORY-2026.md section 1.1, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| MEDIUM | European Union (EU) | Product Liability Directive (EU) 2024/2853, Articles 21 and 22 | From 9 December 2026 national strict-liability law treats standalone software and app updates as a product. Anything placed on the market or put into service on or after that date falls under the new regime. | 2026-12-09 | none | 2026-12-09 | 2026-12-09 | 55 days | docs/EU-REGULATORY-2026.md section 5, references/rules/safety.md |
+| HIGH | Australia | Privacy Act 1988 APP 1.7 to 1.9, inserted by the Privacy and Other Legislation Amendment Act 2024 | From 10 December 2026 the privacy policy must state the kinds of personal information used by, and the decisions made by, automated decision-making that significantly affects rights or interests. | 2026-12-10 | none | 2026-12-10 | 2026-12-10 | 56 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/rules/privacy.md |
+| HIGH | Australia | Children's Online Privacy Code under the Privacy Act 1988 | The Code must be finalised and registered by 10 December 2026, bringing binding children's-privacy obligations to social media, relevant electronic services, and designated internet services. | 2026-12-10 | none | 2026-12-10 | 2026-12-10 | 56 days | docs/GLOBAL-REGULATORY-2026.md section 3.2, references/guidelines/by-app-type/kids-category-and-families.md |
+| CRITICAL | Alabama (USA State) | Alabama HB 161 (App Store Accountability Act) | App stores verify age category, link minors to a parent account, and obtain verifiable parental consent per download and in-app purchase. Effective 1 January 2027 per HB 161 Section 14 (enrolled text). Accounts in existence on 2 October 2026 must be age-verified with consent before 1 October 2027. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.2, references/rules/privacy.md |
+| HIGH | United Kingdom (UK) | Digital Markets, Competition and Consumers Act 2024, Part 4 Chapter 2 subscription contracts regime | Auto-renewing subscription apps sold to UK consumers need pre-contract information, renewal reminders, two cooling-off periods, an easy cancellation path, and the new refund rules. Government announced on 9 August 2026 that the regime commences in January 2027 (exact day not yet published), superseding the earlier spring 2027 estimate. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/payments.md |
+| HIGH | Brazil | ANPD Digital ECA roadmap, Etapa II and III | ANPD publishes guidance and normative parameters on age-assurance mechanisms from August 2026 with adaptation through November 2026, and starts active enforcement of the Digital ECA age-assurance obligations from January 2027. | 2026-08-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 3.3, references/rules/privacy.md |
+| CRITICAL | California (USA State) | AB 1043, Digital Age Assurance Act, Civil Code Title 1.81.9 | Operating systems and app stores collect age at setup and expose an age-bracket signal by API. Developers request and use the signal. Operative 1 January 2027. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/rules/privacy.md |
+| HIGH | California (USA State) | SB 976, Protecting Our Kids from Social Media Addiction Act, Health and Safety Code sections 27001 to 27006 | From 1 January 2027 treat every user as a minor unless age assurance reasonably determines otherwise before serving an addictive feed or sending notifications between midnight and 6am or during school hours. AG age-assurance regulations due the same day. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/guidelines/by-app-type/social-and-user-generated-content.md |
+| HIGH | California (USA State) | AB 56, Health and Safety Code Chapter 25 from section 28000 | Covered social media platforms display the Surgeon General black-box warning daily on first use, again after three cumulative hours, then hourly. Operative 1 January 2027. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/guidelines/by-app-type/social-and-user-generated-content.md |
+| HIGH | California (USA State) | CPPA regulations, 11 CCR section 7200(b), 7155(b), 7157(a)(1), 7121(a) | Give notice, allow opt-out, and answer access requests for automated decision-making technology used in significant decisions by 1 January 2027. Complete risk assessments for pre-2026 processing by 31 December 2027 and submit by 1 April 2028. Cybersecurity audit certifications start 1 April 2028 for revenue above 100 million dollars. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.4, references/rules/privacy.md |
+| HIGH | Vermont (USA State) | Age-Appropriate Design Code Act, Act 63 | Highest-privacy defaults for minors, minimised collection, no late-night push notifications, AG age-assurance rules apply. Effective 1 January 2027. Rulemaking comments due 2 October 2026. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.5, references/guidelines/by-app-type/kids-category-and-families.md |
+| HIGH | Washington (USA State) | HB 2225, Chapter 168, Laws of 2026, regulating artificial intelligence companion chatbots | Companion chatbot disclosure and minor protections, including an hourly disclosure for continuing minor use. Effective 1 January 2027. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.5, references/guidelines/by-app-type/ai-and-generative-apps.md |
+| MEDIUM | Oklahoma (USA State) | SB 546, Oklahoma Consumer Data Privacy Act | Honour access, correction, deletion, portability, and opt-out of sale, targeted advertising, and profiling from 1 January 2027. | 2027-01-01 | none | 2027-01-01 | 2027-01-01 | 78 days | docs/GLOBAL-REGULATORY-2026.md section 2.5, references/rules/privacy.md |
+| MEDIUM | European Union (EU) | Data Act, Regulation (EU) 2023/2854, Article 29(1) | Providers of data processing services charge zero for a customer switching away. Legacy indefinite or long-dated contracts concluded on or before 12 September 2025 must meet Chapter IV unfair-terms rules by 12 September 2027. | 2027-01-12 | none | 2027-01-12 | 2027-01-12 | 89 days | docs/EU-REGULATORY-2026.md section 5 |
## Full Chronological Timeline
@@ -82,7 +93,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
| 2008-06-01 | Biometric Information Privacy Act (BIPA), 740 ILCS 14 | Written notice and release before collecting biometric identifiers, public retention schedule, destruction within 3 years, and no sale. | Illinois (USA State) | 2008-06-01 | none | 2008-06-01 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/rules/privacy.md |
| 2021-09-02 | ICO Age Appropriate Design Code (Children's Code) | High privacy by default, data minimisation, geolocation off, profiling off by default, and a mandatory DPIA. | United Kingdom (UK) | 2020-09-02 | 12 months | 2021-09-02 | HIGH | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/privacy.md |
| 2022-03-15 | Telecommunications Business Act | Approved billing providers, 26% commission, com.apple.developer.storekit.external-purchase entitlement, South Korea-only binary, modal sheet, reporting. | South Korea | 2022-03-15 | none | 2022-03-15 | HIGH | docs/GLOBAL-REGULATORY-2026.md section 3.5, references/rules/payments.md |
-| 2024-03-07 | EU Digital Markets Act (DMA) | External purchase links and alternative payments (com.apple.developer.storekit.external-purchase-link entitlement, custom link sheet, CTC 5% reporting). | European Union (EU) | 2024-03-07 | none | 2024-03-07 | HIGH | docs/EU-REGULATORY-2026.md section 2 |
+| 2024-03-07 | EU Digital Markets Act (DMA) | Alternative payments and out-of-app offers (StoreKit External Purchases or Offers Entitlement, ExternalPurchaseCustomLink disclosure sheet, In-App Purchase at equal prominence when offered, parental gates for minors, options kept 12 months, monthly transaction reporting). | European Union (EU) | 2024-03-07 | none | 2024-03-07 | HIGH | docs/EU-REGULATORY-2026.md section 2 |
| 2024-03-31 | Mobile App Filing with the MIIT (ICP Extension) | Mandatory Chinese MIIT app filing, local partner/entity, real-name, PIPL privacy, data localization, Banhao license for games. | China | 2023-09-01 | 7 months | 2024-03-31 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 3.9, references/rules/metadata.md |
| 2024-06-25 | FTC Health Breach Notification Rule, 16 CFR Part 318 | 2024 Final Rule compliance (unauthorized sharing of health/sensitive data with advertisers treated as breach, mandatory 60-day notice). | United States (Federal) | 2024-06-25 | none | 2024-06-25 | HIGH | docs/GLOBAL-REGULATORY-2026.md section 2.6, references/guidelines/by-app-type/health-fitness-and-medical.md |
| 2024-12-13 | General Product Safety Regulation (GPSR), Regulation (EU) 2023/988 | Display manufacturer identity, electronic and postal contact details, and product safety warnings on the online interface for consumer products. | European Union (EU) | 2023-06-12 | 18 months | 2024-12-13 | HIGH | docs/REGULATORY-GAP-REPORT-2026.md section 1, references/rules/safety.md |
@@ -91,7 +102,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
| 2025-02-17 | EU Digital Services Act (DSA) | Trader status declaration and verification (D-U-N-S, phone, email publish, 2FA verified) or app removal from EU storefront. | European Union (EU) | 2024-02-17 | 12 months | 2025-02-17 | CRITICAL | docs/EU-REGULATORY-2026.md section 3, references/rules/metadata.md |
| 2025-03-19 | Google Play Child Safety Standards Policy | Publish CSAE standards on globally reachable web page, in-app feedback, CSAM response protocol, named child-safety contact. | Google Play (Global) | 2025-03-19 | none | 2025-03-19 | CRITICAL | docs/PLATFORM-MECHANICS-2026.md section 3.2, references/rules/android.md |
| 2025-05-28 | Google Play Photo and Video Permissions Policy | Broad-access READ_MEDIA_IMAGES/READ_MEDIA_VIDEO restricted to broad-access apps; others must use Android Photo Picker. | Google Play (Global) | 2025-05-28 | none | 2025-05-28 | CRITICAL | docs/PLATFORM-MECHANICS-2026.md section 2.9, references/rules/android.md |
-| 2025-06-28 | European Accessibility Act (EAA), Directive (EU) 2019/882 | Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and published accessibility statement. | European Union (EU) | 2022-06-28 | 36 months | 2025-06-28 | HIGH | docs/EU-REGULATORY-2026.md section 4, references/rules/design.md |
+| 2025-06-28 | European Accessibility Act (EAA), Directive (EU) 2019/882 | Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and Annex V accessibility information published in the terms and conditions or an equivalent document (Article 13(2)). | European Union (EU) | 2022-06-28 | 36 months | 2025-06-28 | HIGH | docs/EU-REGULATORY-2026.md section 4, references/rules/design.md |
| 2025-07-25 | UK Online Safety Act 2023 | Highly Effective Age Assurance methods (facial age estimation, open banking, credit-card checks) to protect children from harmful content. | United Kingdom (UK) | 2025-07-25 | none | 2025-07-25 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/rules/safety.md |
| 2025-08-02 | EU AI Act, Regulation (EU) 2024/1689 | GPAI-model obligations, governance, and penalties (Articles 99 and 100). | European Union (EU) | 2024-08-01 | 12 months | 2025-08-02 | HIGH | docs/EU-REGULATORY-2026.md section 1.1, section 1.6 |
| 2025-08-31 | Google Play Target API Requirement | New apps and updates must target API level 35 (Android 15) or higher, and existing target API 34+. | Google Play (Global) | 2025-08-31 | none | 2025-08-31 | CRITICAL | docs/PLATFORM-MECHANICS-2026.md section 2.5, references/rules/android.md |
@@ -133,7 +144,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
| 2026-10-01 | US alternative billing and external links program. transaction reporting and service fees (Play Console Help answer 16497028) | Developers enrolled in the US alternative billing or external links program must report transactions and successful downloads and pay the relevant Play service fee starting 1 October 2026. | Google Play (United States) | 2026-10-01 | none | 2026-10-01 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 2.3, docs/GOOGLE-PLAY.md |
| 2026-10-01 | Apple EU business terms update. Core Technology Commission replaces the Core Technology Fee, ADPLA Attachment 14 (Apple Developer news gmws0jgp and 0cgo95n6) | From 1 October 2026 the per-install Core Technology Fee is replaced by a 5 percent Core Technology Commission on digital transactions in apps distributed outside the App Store, the Initial Acquisition Fee and Store Services Fee are eliminated, apps may offer alternative payment options alongside Apple In-App Purchase, and marketplace and web distribution eligibility widens to seven alternative criteria. Attachment 14 of the ADPLA must be accepted. | European Union (EU) | 2026-08-18 | until 1 October 2026 | 2026-10-01 | CRITICAL | docs/EU-REGULATORY-2026.md section 2.3 |
| 2026-10-22 | Apple multiseat subscription purchases (Apple Developer news likeohx4) | Since 16 September 2026 multiseat purchases are enabled by default for subscriptions in App Store Connect. Volume Purchasing through Apple Business and Apple School Manager launches on 22 October 2026, and Group Purchases launch this winter. Before 22 October decide for each auto-renewable subscription whether organizations and groups may buy seats, and disable multiseat purchases, or limit them across the App Store, Apple Business, and Apple School Manager, where they do not fit your pricing or entitlement logic. Source https://developer.apple.com/news/?id=likeohx4 | Apple App Store (Global) | 2026-09-16 | about 5 weeks | 2026-10-22 | MEDIUM | docs/APPLE.md 2026 changes you must act on |
-| 2026-10-23 | Apple iPhone Duo platform readiness | iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. App Store Connect does not accept iPhone Duo screenshots yet (Apple says later this year), so the 6.9 inch set stays required. Tracked in issue #724. Sources https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo | Apple App Store (Global) | 2026-09-09 | about 6 weeks | 2026-10-23 | HIGH | docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific, docs/GAP-ANALYSIS-2026-09.md open items |
+| 2026-10-23 | Apple iPhone Duo platform readiness | iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. Since 5 October 2026 App Store Connect accepts iPhone Duo optimized apps and Duo screenshots, which earn a product page badge, and from April 2027 Duo screenshots are required for apps using the iOS 27.1 SDK or later (APPLE-IPHONE-DUO-SCREENSHOTS-REQ). Tracked in issue #724. Sources https://developer.apple.com/news/?id=kkphp5qo https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo | Apple App Store (Global) | 2026-09-09 | about 6 weeks | 2026-10-23 | HIGH | docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific, docs/GAP-ANALYSIS-2026-09.md open items |
| 2026-11-13 | Digital Personal Data Protection Rules 2025, G.S.R. 846(E), rule 4 | Registered Consent Managers commence one year after Gazette publication (13 November 2025). Be ready to interoperate with a registered Consent Manager ahead of the 18-month tranche on 13 May 2027. | India | 2026-11-13 | none | 2026-11-13 | MEDIUM | docs/GLOBAL-REGULATORY-2026.md section 3.6, references/rules/privacy.md |
| 2026-12-02 | EU AI Act, Regulation (EU) 2024/1689 as amended by Regulation (EU) 2026/1744, Article 111(4) and Article 5(1)(ba) and (bb) | Retrofit Article 50(2) machine-readable AI-content marking onto any generative audio, image, video, or text system already on the market before 2 August 2026, and stop operating any AI system whose intended or reasonably foreseeable output is non-consensual intimate imagery or child sexual abuse material. | European Union (EU) | 2026-12-02 | none | 2026-12-02 | HIGH | docs/EU-REGULATORY-2026.md section 1.1, references/guidelines/by-app-type/ai-and-generative-apps.md |
| 2026-12-09 | Product Liability Directive (EU) 2024/2853, Articles 21 and 22 | From 9 December 2026 national strict-liability law treats standalone software and app updates as a product. Anything placed on the market or put into service on or after that date falls under the new regime. | European Union (EU) | 2026-12-09 | none | 2026-12-09 | MEDIUM | docs/EU-REGULATORY-2026.md section 5, references/rules/safety.md |
@@ -156,6 +167,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
| 2027-02-01 | Play Console technical quality requirements. memory, bitmap, and DEX optimization thresholds (Play Console Help answer 17492799) | Google states From February 2027 (exact day not published) apps must meet minimum optimization of at least 25 percent coverage across optimization, shrinking, and obfuscation with a tool such as R8, must not hold bitmaps in memory in non-visible states, and must stay within memory bad-behavior thresholds. Failure affects visibility and publishing capabilities. | Google Play (Global) | 2026-08-26 | until February 2027 | 2027-02-01 | HIGH | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/performance.md |
| 2027-03-01 | Under-16 social media ban and functionality restrictions, secondary legislation under the Children's Wellbeing and Schools Act (announced 15 June 2026) | Regulations are to be laid before the end of 2026 and implemented in spring 2027 (exact day not yet published, tracked here as 1 March 2027). User-to-user social platforms must block under-16 accounts. For 16 and 17 year olds livestreaming and stranger contact are off by default, notifications are off from midnight to 6am, autoplay and personalised feeds are off by default. AI romantic companion chatbots must enforce a minimum age of 18. | United Kingdom (UK) | 2027-03-01 | none | 2027-03-01 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 3.1, references/guidelines/by-app-type/social-and-user-generated-content.md |
| 2027-04-01 | Apple App Store Submission Requirements | Starting April 2027 apps and games uploaded to App Store Connect must be built with the iOS 27 and iPadOS 27 SDK or later, and the matching tvOS 27, visionOS 27, and watchOS 27 SDKs. Apple has published the month only, no exact day, so this entry is tracked as 1 April 2027 and must be re-checked when Apple names the date. macOS is not in Apple's list. Announced 9 September 2026 with the Xcode 27 Release Candidate. Source https://developer.apple.com/news/?id=k1mtkt1k | Apple App Store (Global) | 2026-09-09 | about 7 months | 2027-04-01 | CRITICAL | docs/PLATFORM-MECHANICS-2026.md section 1.6, docs/APPLE.md 2026 changes, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific |
+| 2027-04-01 | Apple App Store Submission Requirements | Starting April 2027 App Store Connect requires iPhone Duo screenshots for any app using the iOS 27.1 SDK or later (Apple's screenshot specification page scopes it to that SDK, and the 5 October 2026 news post says every app and game submitted). App Store Connect has accepted iPhone Duo optimized apps and Duo screenshots since 5 October 2026, and a product page with Duo screenshots shows a badge that the app is optimized for iPhone Duo. Apple has published the month only, no exact day, so this entry is tracked as 1 April 2027 and must be re-checked when Apple names the date. Sources https://developer.apple.com/news/?id=kkphp5qo https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications | Apple App Store (Global) | 2026-10-05 | about 6 months | 2027-04-01 | HIGH | docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific |
| 2027-04-01 | Play Console technical quality requirements. Zero-Tap Sign-In restoration (Play Console Help answer 17492799) | Google states From April 2027 (exact day not published) any app supporting user sign-in, optional or mandatory, must restore the user's sign-in state when they move to a new Android device using the Restore Credentials API. Games are currently out of scope. | Google Play (Global) | 2026-08-26 | until April 2027 | 2027-04-01 | HIGH | docs/GOOGLE-PLAY.md 2026 policy rounds, references/rules/design.md |
| 2027-04-26 | ADA Title II web and mobile app accessibility, 28 CFR Part 35 Subpart H, Interim Final Rule FR Doc. 2026-07663 (20 April 2026) | A mobile app provided or made available by a state or local government entity serving 50,000 or more people must conform to WCAG 2.1 Level AA. Reaches a commercial developer through the contract or licensing chain. The 2024 date of 24 April 2026 was extended to 26 April 2027. | United States (Federal) | 2026-04-20 | none | 2027-04-26 | HIGH | docs/GLOBAL-REGULATORY-2026.md section 2.8, references/rules/design.md |
| 2027-05-06 | Utah SB 142 (App Store Accountability Act) as amended by HB 498 (2026) | Request and receive age category from store, confirm parental consent for minor accounts, delete verification data. HB 498 (2026) moved every substantive duty to Beginning May 6, 2027, brought pre-installed apps into scope, repealed Division rulemaking, and replaced AG enforcement with a private right of action (1,000 dollars per violation minimum). The CCIA challenge was voluntarily dismissed on 21 April 2026. | Utah (USA State) | 2027-05-06 | 12 months for operational aspects | 2027-05-06 | CRITICAL | docs/GLOBAL-REGULATORY-2026.md section 1, section 2.2, references/rules/privacy.md |
@@ -216,7 +228,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
- **Jurisdiction:** European Union (EU)
- **Law:** EU Digital Markets Act (DMA)
-- **Requirement:** External purchase links and alternative payments (com.apple.developer.storekit.external-purchase-link entitlement, custom link sheet, CTC 5% reporting).
+- **Requirement:** Alternative payments and out-of-app offers (StoreKit External Purchases or Offers Entitlement, ExternalPurchaseCustomLink disclosure sheet, In-App Purchase at equal prominence when offered, parental gates for minors, options kept 12 months, monthly transaction reporting).
- **Effective Date:** 2024-03-07
- **Grace Period:** none
- **Mandatory Date:** 2024-03-07
@@ -324,7 +336,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
- **Jurisdiction:** European Union (EU)
- **Law:** European Accessibility Act (EAA), Directive (EU) 2019/882
-- **Requirement:** Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and published accessibility statement.
+- **Requirement:** Harmonised standard EN 301 549 Chapter 11 / WCAG 2.1 AA mobile accessibility compliance and Annex V accessibility information published in the terms and conditions or an equivalent document (Article 13(2)).
- **Effective Date:** 2022-06-28
- **Grace Period:** 36 months
- **Mandatory Date:** 2025-06-28
@@ -828,7 +840,7 @@ Last compiled: 2026-09-30 08:33:45 UTC
- **Jurisdiction:** Apple App Store (Global)
- **Law:** Apple iPhone Duo platform readiness
-- **Requirement:** iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. App Store Connect does not accept iPhone Duo screenshots yet (Apple says later this year), so the 6.9 inch set stays required. Tracked in issue #724. Sources https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo
+- **Requirement:** iPhone Duo, Apple's first foldable iPhone, opens for pre-order on 16 October 2026 and ships 23 October 2026, launching on iOS 27.1. Apps built with Xcode 26 or earlier still run but do not extend under the status bar and camera. Build with Xcode 27.1 (beta from 18 September 2026) and the iOS 27.1 SDK, test every pose in the Duo simulator, resize from size classes and scene bounds, handle reserved regions (outer camera, inner camera when active, the folding region), and let navigation bars, toolbars, and tab bars present vertically. Since 5 October 2026 App Store Connect accepts iPhone Duo optimized apps and Duo screenshots, which earn a product page badge, and from April 2027 Duo screenshots are required for apps using the iOS 27.1 SDK or later (APPLE-IPHONE-DUO-SCREENSHOTS-REQ). Tracked in issue #724. Sources https://developer.apple.com/news/?id=kkphp5qo https://www.apple.com/newsroom/2026/09/apple-unveils-iphone-duo/ https://developer.apple.com/documentation/technologyoverviews/preparing-your-app-for-iphone-duo
- **Effective Date:** 2026-09-09
- **Grace Period:** about 6 weeks
- **Mandatory Date:** 2026-10-23
@@ -1100,6 +1112,18 @@ Last compiled: 2026-09-30 08:33:45 UTC
- **Priority:** CRITICAL
- **Affected Repository Sections:** docs/PLATFORM-MECHANICS-2026.md section 1.6, docs/APPLE.md 2026 changes, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific
+### ID: APPLE-IPHONE-DUO-SCREENSHOTS-REQ
+
+- **Jurisdiction:** Apple App Store (Global)
+- **Law:** Apple App Store Submission Requirements
+- **Requirement:** Starting April 2027 App Store Connect requires iPhone Duo screenshots for any app using the iOS 27.1 SDK or later (Apple's screenshot specification page scopes it to that SDK, and the 5 October 2026 news post says every app and game submitted). App Store Connect has accepted iPhone Duo optimized apps and Duo screenshots since 5 October 2026, and a product page with Duo screenshots shows a badge that the app is optimized for iPhone Duo. Apple has published the month only, no exact day, so this entry is tracked as 1 April 2027 and must be re-checked when Apple names the date. Sources https://developer.apple.com/news/?id=kkphp5qo https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications
+- **Effective Date:** 2026-10-05
+- **Grace Period:** about 6 months
+- **Mandatory Date:** 2027-04-01
+- **Enforcement Date:** 2027-04-01
+- **Priority:** HIGH
+- **Affected Repository Sections:** docs/PLATFORM-MECHANICS-2026.md section 1.8, docs/PRE-SUBMISSION-CHECKLIST.md Apple specific
+
### ID: GOOGLE-RESTORE-CREDENTIALS-APR-2027
- **Jurisdiction:** Google Play (Global)
diff --git a/scripts/accessibility-audit-test.sh b/scripts/accessibility-audit-test.sh
index 3bac691..ed77e9f 100755
--- a/scripts/accessibility-audit-test.sh
+++ b/scripts/accessibility-audit-test.sh
@@ -444,6 +444,466 @@ else
bad "Failed to flag ANDROID-ACCESSIBILITY-SCANNER"
fi
+# --- Issue #834 and --rule regression cases ---
+ISSUE_DIR=$(mktemp -d "/tmp/access_issue834_XXXXXX")
+mkdir -p "$ISSUE_DIR/icon_bad" "$ISSUE_DIR/icon_good" "$ISSUE_DIR/clean" "$ISSUE_DIR/tap"
+
+cat << 'EOF' > "$ISSUE_DIR/icon_bad/IconButton.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button { delete() } label: { Image(systemName: "trash") }
+ Button(action: edit) {
+ Image(systemName: "pencil")
+ }
+ }
+}
+EOF
+
+cat << 'EOF' > "$ISSUE_DIR/icon_good/IconButtonLabeled.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button { delete() } label: { Image(systemName: "trash") }
+ .accessibilityLabel("Delete")
+ Button("Save", systemImage: "square.and.arrow.down") { save() }
+ Button { go() } label: { Label("Go", systemImage: "arrow.right") }
+ Image(systemName: "star")
+ }
+}
+EOF
+
+cat << 'EOF' > "$ISSUE_DIR/clean/Clean.swift"
+import SwiftUI
+// Mentions of UIButton and Button in a comment are not interactions.
+struct V: View {
+ var body: some View {
+ Text("Hello").font(.body)
+ }
+}
+EOF
+
+cat << 'EOF' > "$ISSUE_DIR/tap/Tap.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Text("Hello").onTapGesture { open() }
+ }
+}
+EOF
+
+mkdir -p "$ISSUE_DIR/icon_bad2" "$ISSUE_DIR/lexer_clean" "$ISSUE_DIR/big"
+cat << 'EOF' > "$ISSUE_DIR/icon_bad2/Inline.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(action: {}, label: { Image(systemName: "trash") })
+ Button(action: edit) { Image (systemName: "gear") }
+ HStack {
+ Button(action: {}) { Image(systemName: "xmark") }.padding(); Text("Other").accessibilityLabel("Other")
+ }
+ }
+}
+EOF
+
+cat << 'EOF' > "$ISSUE_DIR/lexer_clean/Strings.swift"
+import SwiftUI
+/* outer /* nested Button { } label: { Image(systemName: "a") } */ still a comment Button(action: x) { Image(systemName: "b") } */
+let raw = #"Button(action: x) { Image(systemName: "c") } and "quotes" inside"#
+let multi = """
+Button(action: y) { Image(systemName: "d") }
+see https://docs.example/a // not a comment
+"""
+struct V: View {
+ var body: some View { Text(multi).font(.body) }
+}
+EOF
+
+mkdir -p "$ISSUE_DIR/regex_lit" "$ISSUE_DIR/chain_perf" "$ISSUE_DIR/mod_perf"
+mkdir -p "$ISSUE_DIR/sweep15"
+cat << 'EOF' > "$ISSUE_DIR/sweep15/S.swift"
+import SwiftUI
+struct V: View {
+ let title = "Pause"
+ var body: some View {
+ Button(title) { icon = Image(systemName: "pause") }
+ ((Button(action: {}) { Image(systemName: "trash") })).accessibilityLabel("Delete")
+ Button(action: {}) { Image(systemName: "a") } . accessibilityLabel("A")
+ Button(action: {}) { Image(systemName: "b") }
+ #if DEBUG
+ .padding()
+ #endif
+ .accessibilityLabel("B")
+ Button(action: {}) { Image(systemName: "c") }.`accessibilityLabel`("C")
+ Button(action: {}) { Image(systemName: "d"); `Text`("D") }
+ Button(action: {}) { Image(systemName: "e") }.accessibility(label: Text("E"))
+ Button(action: {}) { Image(systemName: "f") }.accessibility(hidden: true)
+ Button(action: {}) { Image(systemName: "g") }.accessibilityRepresentation { Text("G") }
+ Button(action: {}) { Image(systemName: "h") }.accessibilityHidden((true))
+ `Button`(action: {}) { Image(systemName: "i") }
+ Button(action: {}) { Image(systemName: "j") }.accessibilityLabel("J", isEnabled: false)
+ }
+}
+EOF
+mkdir -p "$ISSUE_DIR/multi_closure"
+cat << 'EOF' > "$ISSUE_DIR/multi_closure/M.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(action: {}) { Image(systemName: "trash") }
+ .contextMenu { Text("Menu") } preview: { Text("Preview") }
+ .accessibilityLabel("Delete")
+ Button(action: {}) { Image(systemName: "gear") }
+ .contextMenu { Text("Menu") } preview: { Text("Preview") }
+ }
+}
+EOF
+mkdir -p "$ISSUE_DIR/qualified"
+cat << 'EOF' > "$ISSUE_DIR/qualified/Q.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ SwiftUI.Button(action: {}) { Image(systemName: "gear") }
+ MyKit.Button(action: {}) { Image(systemName: "trash") }
+ let b = self.Button(action: {}) { Image(systemName: "star") }
+ let c = MyKit . SwiftUI.Button(action: {}) { Image(systemName: "bell") }
+ let d = ΩSwiftUI.Button(action: {}) { Image(systemName: "flag") }
+ let e = obj . Button(action: {}) { Image(systemName: "pin") }
+ }
+}
+EOF
+mkdir -p "$ISSUE_DIR/regex_esc"
+cat << 'EOF' > "$ISSUE_DIR/regex_esc/Esc.swift"
+import SwiftUI
+let re = #/foo\/#[/*]/#
+let s = "x \(#/a\/#b/#) y"
+struct V: View {
+ var body: some View {
+ Button(action: {}) { Image(systemName: "gear") }
+ }
+}
+EOF
+cat << 'EOF' > "$ISSUE_DIR/regex_lit/Regex.swift"
+import SwiftUI
+let re = #/[Button(action: {}) { Image(systemName: "trash") }]/#
+let s = "count \(#/ // ) " /#.description)"
+struct V: View {
+ var body: some View {
+ Button(action: {}) { Image(systemName: "gear") }
+ }
+}
+EOF
+python3 - "$ISSUE_DIR" << 'PY'
+import os, sys
+d = sys.argv[1]
+q = chr(34); nl = chr(10)
+chain = "let v0 = Image(systemName: " + q + "trash" + q + ")" + nl + "".join("let v%d = v%d" % (k, k - 1) + nl for k in range(1, 3200))
+with open(os.path.join(d, "chain_perf", "Chain.swift"), "w") as fh:
+ fh.write("Button(action: {}) {" + nl + chain + "return v3199" + nl + "}" + nl)
+n = 32000
+with open(os.path.join(d, "mod_perf", "Mods.swift"), "w") as fh:
+ fh.write(("Button(action: {}) { Image(systemName: " + q + "trash" + q + ") }.overlay(") * n + "EmptyView()" + ")" * n + nl)
+PY
+
+mkdir -p "$ISSUE_DIR/icon_r7" "$ISSUE_DIR/nested_labels"
+cat << 'EOF' > "$ISSUE_DIR/icon_r7/R7.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(action: {}) { let icon = Image(systemName: "trash"); return icon }
+ Button(action: {}) { return Image(systemName: "gear"); Text("Unused") }
+ }
+}
+EOF
+python3 - "$ISSUE_DIR" << 'PY'
+import os, sys
+q = chr(34)
+n = 16000
+with open(os.path.join(sys.argv[1], "nested_labels", "Labels.swift"), "w") as fh:
+ fh.write(("Button(action: {}) {" + chr(10)) * n + "Image(systemName: " + q + "trash" + q + ")" + (chr(10) + "}") * n + chr(10))
+PY
+
+mkdir -p "$ISSUE_DIR/icon_r6" "$ISSUE_DIR/clean_r6" "$ISSUE_DIR/deep_interp" "$ISSUE_DIR/nested_perf"
+cat << 'EOF' > "$ISSUE_DIR/icon_r6/R6.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(role: .destructive) { delete() } label: /* explanation explanation explanation explanation explanation explanation explanation */ { Image(systemName: "trash") }
+ Button { go() } label: { let discarded = Text("Delete"); return Image(systemName: "gear") }
+ }
+}
+EOF
+cat << 'EOF' > "$ISSUE_DIR/clean_r6/R6.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button { go() } label: { let discarded = Image(systemName: "trash"); return EmptyView() }
+ }
+}
+EOF
+python3 - "$ISSUE_DIR" << 'PY'
+import os, sys
+d = sys.argv[1]
+q = chr(34); bs = chr(92)
+with open(os.path.join(d, "deep_interp", "Deep.swift"), "w") as fh:
+ fh.write("let text = " + (q + bs + "(") * 3000 + q + "x" + q + (")" + q) * 3000 + "\n")
+n = 3000
+with open(os.path.join(d, "nested_perf", "Nested.swift"), "w") as fh:
+ fh.write("Button(action: {" * n + "work()" + ("}) { Image(systemName: " + q + "trash" + q + ") }") * n + "\n")
+PY
+
+mkdir -p "$ISSUE_DIR/icon_role" "$ISSUE_DIR/role_clean"
+cat << 'EOF' > "$ISSUE_DIR/icon_role/Role.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(role: .destructive) { delete() } label: { Image(systemName: "trash") }
+ }
+}
+EOF
+cat << 'EOF' > "$ISSUE_DIR/role_clean/Role.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(role: .destructive) { let i = Image(systemName: "trash"); use(i) } label: { Text("Delete") }
+ }
+}
+EOF
+
+mkdir -p "$ISSUE_DIR/icon_bad4"
+cat << 'EOF' > "$ISSUE_DIR/icon_bad4/InterpComment.swift"
+import SwiftUI
+func f(_ n: Int) -> Int { n }
+let a = "Value \(f(/* ( " */ 1))"
+struct V: View {
+ var body: some View {
+ Button(action: {}) { Image(systemName: "trash") }
+ }
+}
+EOF
+
+mkdir -p "$ISSUE_DIR/icon_bad3" "$ISSUE_DIR/lexer_clean2"
+cat << 'EOF' > "$ISSUE_DIR/icon_bad3/Nested.swift"
+import SwiftUI
+struct V: View {
+ var body: some View {
+ Button(action: { confirm(title: "Delete?") }) {
+ Image(systemName: "trash")
+ }
+ Button(action: { log(label: { Text("log") }) }) { Image(systemName: "gear") }
+ Button(action: {}) { Image(systemName: "xmark") }.accessibilityHidden(isLoading == true)
+ }
+}
+EOF
+
+cat << 'EOF' > "$ISSUE_DIR/lexer_clean2/Interp.swift"
+import SwiftUI
+let a = "Value \(f("Button(action: {}) { Image(systemName: icon) }"))"
+let b = #"before \#"# Button(action: {}) { Image(systemName: "trash") } after"#
+struct V: View {
+ var body: some View { Text(a + b).font(.body) }
+}
+EOF
+
+python3 - "$ISSUE_DIR/big/Big.swift" << 'PY'
+import sys
+block = 'struct V%d: View {\n var body: some View {\n Button(action: {}) { Image(systemName: "trash") }\n }\n}\n'
+with open(sys.argv[1], "w") as f:
+ for i in range(16000):
+ f.write(block % i)
+PY
+
+OUT=$($AUDIT "$ISSUE_DIR/sweep15" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 2 ] && echo "$OUT" | grep -q "S.swift:19)" && echo "$OUT" | grep -q "S.swift:20)"; then
+ ok "#834 titled by a variable, parenthesized, spaced dot, #if block, escaped names, accessibility(label:/hidden:), representation and ((true)) all read, and an escaped Button or a disabled label is still reported"
+else
+ bad "#834 the round 15 sweep cases changed. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/multi_closure" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ] && echo "$OUT" | grep -q "M.swift:7)"; then
+ ok "#834 a modifier with several trailing closures does not end the chain before its accessibilityLabel"
+else
+ bad "#834 a multi-closure modifier hid a later accessibilityLabel, or a real finding was lost. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/qualified" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ] && echo "$OUT" | grep -q "Q.swift:4)"; then
+ ok "#834 SwiftUI.Button is read as a Button, another module's or a member's Button is not"
+else
+ bad "#834 a SwiftUI-qualified Button was missed, or an unrelated member Button was flagged. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/regex_esc" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ] && echo "$OUT" | grep -q "Esc.swift:6)"; then
+ ok "#834 an escaped delimiter inside a #/regex/# literal does not end it early, in code or interpolation"
+else
+ bad "#834 an escaped regex delimiter ended the literal early or hid the real Button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/regex_lit" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ] && echo "$OUT" | grep -q "Regex.swift:6)"; then
+ ok "#834 a Button inside a #/regex/# literal is ignored, inside interpolation too, and the real Button after it is found"
+else
+ bad "#834 a regex literal was read as code, or hid the real Button. Output:"; echo "$OUT"
+fi
+
+for CASE in chain_perf:1:"3200 chained local bindings" mod_perf:32000:"32000 Buttons nested in modifiers"; do
+ DIRN="${CASE%%:*}"; REST="${CASE#*:}"; WANT="${REST%%:*}"; NAME="${REST#*:}"
+ START=$(python3 -c 'import time; print(time.time())')
+ OUT=$($AUDIT "$ISSUE_DIR/$DIRN" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1); RC=$?
+ ELAPSED=$(python3 -c "import time; print(round(time.time() - $START, 2))")
+ COUNT=$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")
+ if [ "$RC" -eq 0 ] && [ "$COUNT" -eq "$WANT" ] && python3 -c "import sys; sys.exit(0 if $ELAPSED < 5 else 1)"; then
+ ok "#834 $NAME report $WANT finding(s) in under 5s (${ELAPSED}s)"
+ else
+ bad "#834 $NAME were slow or miscounted (rc=$RC count=$COUNT want=$WANT ${ELAPSED}s)"
+ fi
+done
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_r7" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "R7.swift:4)" && ! echo "$OUT" | grep -q "R7.swift:5)"; then
+ ok "#834 a returned local icon is flagged, and (documented limit) a Text anywhere in the label counts, even after a return"
+else
+ bad "#834 whole-label behaviour changed for a returned local or a Text after return. Output:"; echo "$OUT"
+fi
+
+START=$(python3 -c 'import time; print(time.time())')
+OUT=$($AUDIT "$ISSUE_DIR/nested_labels" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1); RC=$?
+ELAPSED=$(python3 -c "import time; print(round(time.time() - $START, 2))")
+if [ "$RC" -eq 0 ] && python3 -c "import sys; sys.exit(0 if $ELAPSED < 3 else 1)"; then
+ ok "#834 16000 nested Button labels scan in under 3s (${ELAPSED}s)"
+else
+ bad "#834 nested labels were slow (rc=$RC ${ELAPSED}s)"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_r6" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "R6.swift:4)" && ! echo "$OUT" | grep -q "R6.swift:5)"; then
+ ok "#834 a long comment before label: does not hide an icon label, and (documented limit) an unused local Text counts as a label"
+else
+ bad "#834 a comment before label: hid an icon label, or whole-label behaviour changed. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/clean_r6" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "R6.swift:4)"; then
+ ok "#834 (documented limit) an unused local Image in a label is still reported as a possible icon-only Button"
+else
+ bad "#834 whole-label behaviour changed for an unused local Image. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/deep_interp" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1); RC=$?
+if [ "$RC" -eq 0 ] && ! echo "$OUT" | grep -q "Traceback"; then
+ ok "#834 3000 levels of string interpolation scan without a crash"
+else
+ bad "#834 deep interpolation crashed the audit (rc=$RC). Output:"; echo "$OUT" | tail -3
+fi
+
+START=$(python3 -c 'import time; print(time.time())')
+OUT=$($AUDIT "$ISSUE_DIR/nested_perf" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1); RC=$?
+ELAPSED=$(python3 -c "import time; print(round(time.time() - $START, 2))")
+COUNT=$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")
+if [ "$RC" -eq 0 ] && [ "$COUNT" -eq 3000 ] && python3 -c "import sys; sys.exit(0 if $ELAPSED < 3 else 1)"; then
+ ok "#834 3000 nested Buttons report all 3000 in under 3s (${ELAPSED}s)"
+else
+ bad "#834 nested Buttons were slow or miscounted (rc=$RC count=$COUNT ${ELAPSED}s)"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_role" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ]; then
+ ok "#834 a role Button reads its label: closure, not its action"
+else
+ bad "#834 a role Button with an icon label was missed. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/role_clean" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "Clean. No accessibility compliance regressions found."; then
+ ok "#834 an Image inside the action does not flag a Button with a Text label"
+else
+ bad "#834 an Image in the action flagged a Text-labelled Button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_bad4" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 1 ]; then
+ ok "#834 a comment inside string interpolation does not hide the code after it"
+else
+ bad "#834 a comment inside interpolation swallowed the rest of the file. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_bad3" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 3 ]; then
+ ok "#834 a title or label inside the action, or conditional hiding, does not hide an icon button"
+else
+ bad "#834 an action argument or conditional hiding suppressed an icon button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/lexer_clean2" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "Clean. No accessibility compliance regressions found."; then
+ ok "#834 buttons inside string interpolation and escaped raw strings are not flagged"
+else
+ bad "#834 flagged a button inside interpolation or an escaped raw string. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_bad2" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 3 ]; then
+ ok "#834 inline label closure, spaced Image (, and a sibling label on the same line are all flagged"
+else
+ bad "#834 missed an inline, spaced, or sibling-shadowed icon button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/lexer_clean" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "Clean. No accessibility compliance regressions found."; then
+ ok "#834 buttons inside nested comments, raw strings, and multiline strings are not flagged"
+else
+ bad "#834 flagged a button that only exists in a comment or string. Output:"; echo "$OUT"
+fi
+
+BUDGET="${A11Y_PERF_BUDGET:-10}"
+START=$(python3 -c 'import time; print(time.time())')
+BIG_OUT=$($AUDIT "$ISSUE_DIR/big" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1); BIG_RC=$?
+ELAPSED=$(python3 -c "import time; print(round(time.time() - $START, 2))")
+BIG_COUNT=$(echo "$BIG_OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")
+if [ "$BIG_RC" -eq 0 ] && [ "$BIG_COUNT" -eq 16000 ] && python3 -c "import sys; sys.exit(0 if $ELAPSED < $BUDGET else 1)"; then
+ ok "#834 a 1.5 MB Swift file reports all 16000 buttons in under ${BUDGET}s (${ELAPSED}s)"
+else
+ bad "#834 large file scan failed, missed buttons, or ran over ${BUDGET}s (rc=$BIG_RC count=$BIG_COUNT ${ELAPSED}s)"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_bad" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if [ "$(echo "$OUT" | grep -c "APPLE-ACCESSIBILITY-VOICEOVER (")" -eq 2 ]; then
+ ok "#834 flagged both icon-only systemName buttons without accessibilityLabel"
+else
+ bad "#834 missed an icon-only systemName button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/icon_good" --rule APPLE-ACCESSIBILITY-VOICEOVER 2>&1)
+if echo "$OUT" | grep -q "Clean. No accessibility compliance regressions found."; then
+ ok "#834 labeled, titled, and Label-based icon buttons are not flagged"
+else
+ bad "#834 false positive on a labeled icon button. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/clean" 2>&1)
+if echo "$OUT" | grep -q "Clean. No accessibility compliance regressions found."; then
+ ok "#834 a clean file with no interaction gets no finding (haptics, UIKit)"
+else
+ bad "#834 clean file produced findings. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/tap" --rule APPLE-ACCESSIBILITY-HAPTICS 2>&1)
+if echo "$OUT" | grep -q "\[LOW\] APPLE-ACCESSIBILITY-HAPTICS"; then
+ ok "#834 haptics stays an advisory LOW finding on a real tap interaction"
+else
+ bad "#834 haptics not reported as LOW advisory on a real interaction. Output:"; echo "$OUT"
+fi
+
+OUT=$($AUDIT "$ISSUE_DIR/clean" --rule APPLE-ACCESSIBILITY-DYNAMIC 2>&1); RC=$?
+if [ "$RC" -ne 0 ] && ! echo "$OUT" | grep -q "Clean."; then
+ ok "An unknown --rule is an error, never a Clean result"
+else
+ bad "An unknown --rule reported Clean or exited 0 (rc=$RC). Output:"; echo "$OUT"
+fi
+rm -rf "$ISSUE_DIR" 2>/dev/null || true
+
echo ""
echo "Accessibility Compliance test suite complete: $PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ]
diff --git a/scripts/accessibility-audit.py b/scripts/accessibility-audit.py
index 07d0e26..c47a3a4 100755
--- a/scripts/accessibility-audit.py
+++ b/scripts/accessibility-audit.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+import bisect
import os
import sys
import re
@@ -38,8 +39,8 @@ RULE_META = {
},
"APPLE-ACCESSIBILITY-HAPTICS": {
"platform": "apple",
- "severity": "medium",
- "title": "Haptics tactile feedback missing on interactions",
+ "severity": "low",
+ "title": "Haptic feedback absent on interactions (advisory, not required by WCAG 2.2 or EN 301 549)",
"fix": "Add haptic feedback to buttons, toggles, and swipe actions using UIImpactFeedbackGenerator or selection feedback."
},
"APPLE-ACCESSIBILITY-KEYBOARD": {
@@ -89,6 +90,339 @@ def scan_files(directory):
android_files.append(path)
return ios_files, android_files
+
+def _string_frame(content, q, hashes):
+ multi = content.startswith('"""', q)
+ return ("s", multi, ('"""' if multi else '"') + "#" * hashes, "\\" + "#" * hashes)
+
+
+def _skip_string(content, q, hashes):
+ """For the string opening at q, return (body start, body end, offset after it).
+ An explicit stack walks nested strings and interpolations, so no depth can overflow."""
+ n = len(content)
+ body_start = q + (3 if content.startswith('"""', q) else 1)
+ stack, j = [_string_frame(content, q, hashes)], body_start
+ while j < n:
+ frame = stack[-1]
+ if frame[0] == "s":
+ _, multi, close, esc = frame
+ if content.startswith(esc, j):
+ k = j + len(esc)
+ if k < n and content[k] == "(":
+ stack.append(["i", 0])
+ j = k
+ else:
+ j = k + 1
+ continue
+ if not multi and content[j] == "\n":
+ stack.pop() # an unterminated single-line string ends at the newline
+ if not stack:
+ return body_start, j, j
+ continue
+ if content.startswith(close, j):
+ stack.pop()
+ if not stack:
+ return body_start, j, j + len(close)
+ j += len(close)
+ continue
+ j += 1
+ continue
+ c = content[j]
+ if content.startswith("//", j):
+ nl = content.find("\n", j)
+ j = n if nl == -1 else nl
+ continue
+ if content.startswith("/*", j):
+ level, j = 1, j + 2
+ while j < n and level:
+ if content.startswith("/*", j):
+ level, j = level + 1, j + 2
+ elif content.startswith("*/", j):
+ level, j = level - 1, j + 2
+ else:
+ j += 1
+ continue
+ if c == '"' or c == "#":
+ h = 0
+ while j + h < n and content[j + h] == "#":
+ h += 1
+ if j + h < n and content[j + h] == '"':
+ inner = _string_frame(content, j + h, h)
+ stack.append(inner)
+ j = j + h + (3 if inner[1] else 1)
+ continue
+ if h and j + h < n and content[j + h] == "/":
+ end = _regex_close(content, j + h + 1, h)
+ j = min(n, end + 1 + h)
+ continue
+ j += max(h, 1)
+ continue
+ if c == "(":
+ frame[1] += 1
+ elif c == ")":
+ frame[1] -= 1
+ if frame[1] == 0:
+ stack.pop()
+ j += 1
+ return body_start, n, n
+
+
+def _regex_close(content, start, hashes):
+ """Offset of the closing slash of a #/.../# literal, skipping backslash escapes, or len(content)."""
+ close = "/" + "#" * hashes
+ n, j = len(content), start
+ while j < n:
+ if content[j] == "\\":
+ j += 2
+ elif content.startswith(close, j):
+ return j
+ else:
+ j += 1
+ return n
+
+
+def swift_code_only(content):
+ """Blank comments (nested too) and string contents, keeping quotes, newlines and offsets.
+ What is left is code, so a Button inside a comment or a string is never read as a control."""
+ out = list(content)
+ n = len(content)
+ i = 0
+
+ def blank(a, b):
+ for k in range(a, b):
+ if out[k] != "\n":
+ out[k] = " "
+
+ while i < n:
+ c = content[i]
+ if content.startswith("//", i):
+ j = content.find("\n", i)
+ j = n if j == -1 else j
+ blank(i, j)
+ i = j
+ elif content.startswith("/*", i):
+ depth, j = 1, i + 2
+ while j < n and depth:
+ if content.startswith("/*", j):
+ depth, j = depth + 1, j + 2
+ elif content.startswith("*/", j):
+ depth, j = depth - 1, j + 2
+ else:
+ j += 1
+ blank(i, j)
+ i = j
+ elif c == "#" or c == '"':
+ hashes = 0
+ while i + hashes < n and content[i + hashes] == "#":
+ hashes += 1
+ q = i + hashes
+ if hashes and q < n and content[q] == "/":
+ end = _regex_close(content, q + 1, hashes)
+ blank(q + 1, end)
+ i = min(n, end + 1 + hashes)
+ continue
+ if q >= n or content[q] != '"':
+ i += max(hashes, 1)
+ continue
+ body_start, body_end, after = _skip_string(content, q, hashes)
+ blank(body_start, body_end)
+ i = after
+ else:
+ i += 1
+ return "".join(out)
+
+
+def _bracket_pairs(code):
+ """Map each opening bracket to the offset just past its match, per bracket type, in one pass."""
+ pairs, stacks = {}, {"(": [], "[": [], "{": []}
+ opener = {")": "(", "]": "[", "}": "{"}
+ for i, ch in enumerate(code):
+ if ch in stacks:
+ stacks[ch].append(i)
+ elif ch in opener and stacks[opener[ch]]:
+ pairs[stacks[opener[ch]].pop()] = i + 1
+ return pairs
+
+
+def _skip_ws(text, i):
+ while i < len(text) and text[i].isspace():
+ i += 1
+ return i
+
+
+def _top_level_args(code, start, end, pairs):
+ """(start, end) offsets of each comma-separated argument at depth 0 between start and end.
+ Nested brackets are jumped over through pairs, so enclosing calls never rescan them."""
+ parts, depth, a, k = [], 0, start, start
+ while k < end:
+ ch = code[k]
+ if ch in "([{":
+ close = pairs.get(k, -1)
+ if depth == 0 and 0 < close <= end:
+ k = close
+ continue
+ depth += 1
+ elif ch in ")]}":
+ depth -= 1
+ elif ch == "," and depth == 0:
+ parts.append((a, k))
+ a = k + 1
+ k += 1
+ parts.append((a, end))
+ return parts
+
+
+DIRECTIVE = re.compile(r"#(?:if|elseif|else|endif)\b")
+LABELED_CLOSURE = re.compile(r"\s*[A-Za-z_][A-Za-z0-9_]*\s*:\s*\{")
+
+
+def _modifier_chain(code, i, pairs):
+ """Read the .modifier(...) chain that follows offset i. Returns (names with args, end offset)."""
+ mods = []
+ n = len(code)
+ while True:
+ j = _skip_ws(code, i)
+ if DIRECTIVE.match(code, j): # #if / #else / #endif lines between modifiers
+ eol = code.find("\n", j)
+ i = n if eol == -1 else eol
+ continue
+ d = _skip_ws(code, j + 1) if j < n and code[j] == "." else n
+ if d >= n or not (code[d].isalpha() or code[d] == "_"):
+ return mods, i
+ k = d
+ while k < n and (code[k].isalnum() or code[k] == "_"):
+ k += 1
+ name, args = code[d:k], None
+ k2 = _skip_ws(code, k)
+ if k2 < n and code[k2] == "(":
+ end = pairs.get(k2, -1)
+ if end == -1:
+ return mods, i
+ args, k = (k2, end), end
+ k2 = _skip_ws(code, k)
+ while k2 < n and code[k2] == "{": # one trailing closure, then any labeled ones
+ end = pairs.get(k2, -1)
+ if end == -1:
+ return mods, i
+ k = end
+ m = LABELED_CLOSURE.match(code, k)
+ k2 = m.end() - 1 if m else n
+ mods.append((name, args))
+ i = k
+
+
+IMAGE_SYMBOL = re.compile(r"\bImage\s*\(\s*systemName\s*:")
+NAMED_CONTENT = re.compile(r"\b(Text|Label)\s*\(|\baccessibilityLabel\b")
+TITLED_ARG = re.compile(r"\s*(#*\"|title\s*:)")
+LABEL_ARG = re.compile(r"\s*label\s*:")
+LABEL_CLOSURE = re.compile(r"\s*label\s*:\s*\{")
+HIDDEN_TRUE = re.compile(r"\((?:\s*\()*\s*true\s*(?:\)\s*)*\)")
+ACC_HIDDEN = re.compile(r"\bhidden\s*:\s*(?:\(\s*)*true\b")
+ACC_LABEL = re.compile(r"\blabel\s*:")
+LABEL_OFF = re.compile(r"\bisEnabled\s*:\s*false\b")
+UNLABELED_ARG = re.compile(r"\s*(?![A-Za-z_][A-Za-z0-9_]*\s*:)[^\s{]")
+
+
+def _labels_button(code, name, args):
+ """True when a modifier gives the Button a spoken label or hides it from VoiceOver."""
+ if name == "accessibilityLabel":
+ return not (args and LABEL_OFF.search(code, *args))
+ if name == "accessibilityRepresentation":
+ return True
+ if name == "accessibilityHidden":
+ return bool(args and HIDDEN_TRUE.fullmatch(code, *args))
+ if name == "accessibility" and args:
+ return bool(ACC_LABEL.search(code, *args) or ACC_HIDDEN.search(code, *args))
+ return False
+
+
+def _any_in(hits, a, b):
+ k = bisect.bisect_left(hits, a)
+ return k < len(hits) and hits[k] < b
+
+
+def _label_closure_after(code, k, pairs):
+ """(start, end) of a label: { ... } closure beginning at or after k, or None."""
+ lab = LABEL_CLOSURE.match(code, k)
+ if not lab:
+ return None
+ start = lab.end() - 1
+ end = pairs.get(start, -1)
+ return None if end == -1 else (start, end)
+
+
+def _line_end(text, start, end):
+ nl = text.find("\n", start, end)
+ return end if nl == -1 else nl
+
+
+def find_icon_only_buttons(code):
+ """Yield (offset, end) for SwiftUI Buttons whose only label is an Image(systemName:)
+ with no accessibilityLabel on the label or on the Button's own modifier chain."""
+ code = code.replace("`", " ") # escaped identifiers read as plain names, offsets kept
+ pairs = _bracket_pairs(code)
+ closer = {end - 1: start for start, end in pairs.items() if code[start] == "("}
+ img_hits = [m.start() for m in IMAGE_SYMBOL.finditer(code)]
+ named_hits = [m.start() for m in NAMED_CONTENT.finditer(code)]
+ for m in re.finditer(r"(?<![\w.])(?:SwiftUI\s*\.\s*)?Button\b", code):
+ k = m.start() - 1
+ while k >= 0 and code[k].isspace():
+ k -= 1
+ if k >= 0 and code[k] == ".":
+ continue # a member of something else, such as MyKit . SwiftUI.Button
+ i = _skip_ws(code, m.end())
+ label = None
+ if i < len(code) and code[i] == "(":
+ end = pairs.get(i, -1)
+ if end == -1:
+ continue
+ parts = _top_level_args(code, i + 1, end - 1, pairs)
+ if any(
+ TITLED_ARG.match(code, a, b) or UNLABELED_ARG.match(code, a, b) for a, b in parts
+ ):
+ continue # a titled button reads its title, literal or not
+ label_part = next(
+ ((a, b) for a, b in parts if LABEL_ARG.match(code, a, b)), None
+ )
+ if label_part:
+ label = _label_closure_after(code, label_part[0], pairs)
+ if not label or label[1] > label_part[1]:
+ continue # a label view passed by name cannot be read here
+ i = end
+ j = _skip_ws(code, i)
+ if label is None and j < len(code) and code[j] == "{":
+ lend = pairs.get(j, -1)
+ if lend == -1:
+ continue
+ label, i = (j, lend), lend
+ after = _label_closure_after(code, i, pairs)
+ if after: # the trailing closure was the action, the label follows it
+ label, i = after, after[1]
+ elif i < len(code) and code[i] == "{":
+ end = pairs.get(i, -1)
+ if end == -1:
+ continue
+ label = _label_closure_after(code, end, pairs)
+ if not label:
+ continue
+ i = label[1]
+ if not label:
+ continue
+ if not _any_in(img_hits, label[0], label[1]) or _any_in(named_hits, label[0], label[1]):
+ continue # the whole label counts, see the documented limit in README.md
+ mods, end = _modifier_chain(code, i, pairs)
+ start = m.start()
+ while True: # ((Button { ... })).modifier reads through every wrapping parenthesis
+ j = _skip_ws(code, end)
+ o = closer.get(j)
+ if o is None or code[o + 1 : start].strip():
+ break
+ start = o
+ more, end = _modifier_chain(code, j + 1, pairs)
+ mods += more
+ if any(_labels_button(code, name, args) for name, args in mods):
+ continue
+ yield m.start(), i
def run_rule_scan(rule_id, ios_files, android_files):
findings = []
@@ -123,8 +457,22 @@ def run_rule_scan(rule_id, ios_files, android_files):
"fix": "Initialize decorative images as Image(decorative: ...) or add an explicit .accessibilityLabel(...) modifier."
})
+ code = swift_code_only(content)
+ newlines = [k for k, ch in enumerate(code) if ch == "\n"]
+ for offset, end in find_icon_only_buttons(code):
+ findings.append(
+ {
+ "file": f,
+ "line": bisect.bisect_right(newlines, offset) + 1,
+ "rule_id": rule_id,
+ "match": content[offset : _line_end(content, offset, end)].strip(),
+ "message": "Possible icon-only Button. Its label shows an Image(systemName:) with no Text, Label or accessibilityLabel, so VoiceOver may read the symbol name.",
+ "fix": 'Add .accessibilityLabel("...") to the Button, or use Label("Title", systemImage: ...) / Button("Title", systemImage: ...).',
+ }
+ )
+
# Look for UIButton / UIImageView declarations in UIKit swift without accessibility properties
- if "UIButton" in content or "UIImageView" in content:
+ if re.search(r"\bUI(Button|ImageView)\b", code):
if not any(kw in content for kw in ["accessibilityLabel", "accessibilityIdentifier", "isAccessibilityElement"]):
findings.append({
"file": f,
@@ -227,7 +575,8 @@ def run_rule_scan(rule_id, ios_files, android_files):
except Exception:
continue
- if "onTapGesture" in content or "Button" in content:
+ code = swift_code_only(content)
+ if re.search(r"\.onTapGesture\b|(?<![A-Za-z0-9_])Button\s*[({]", code):
if not any(kw in content for kw in ["FeedbackGenerator", "CoreHaptics", "CHHapticEngine"]):
findings.append({
"file": f,
@@ -427,6 +776,13 @@ def main():
ios_files, android_files = scan_files(args.directory)
+ if args.rule and args.rule not in RULE_META:
+ print(
+ f"Unknown rule: {args.rule}. Known rules. {', '.join(RULE_META)}",
+ file=sys.stderr,
+ )
+ return 2
+
rules_to_scan = [args.rule] if args.rule else list(RULE_META.keys())
all_findings = []
diff --git a/scripts/monitor-ai-policy-test.sh b/scripts/monitor-ai-policy-test.sh
index 7fb6d28..8841655 100755
--- a/scripts/monitor-ai-policy-test.sh
+++ b/scripts/monitor-ai-policy-test.sh
@@ -153,6 +153,24 @@ echo "$TOPICS" | grep -q "User disclosure requirements" && echo "$TOPICS" | grep
echo "$TOPICS" | grep -q "Google Play AI policies" && echo "$TOPICS" | grep -q "AI-generated content disclosures" && echo "$TOPICS" | grep -q "User safety requirements" && ok "Google topics are matched from the stems policies, disclose and safe" || bad "Google topics are matched from the stems policies, disclose and safe"
rm -f "$STEM_JSON" "$STEM_DOCS" "$STEM_PR"
+# Feed descriptions carry HTML. The parser keeps only the visible text, so a keyword
+# inside a link target ("/llm/") cannot match an item that never mentions it.
+HT="$(mktemp -d)"
+cat > "$HT/feed.rss" <<'XML'
+<rss><channel><item><title>Tax &amp;amp; price updates</title>
+<description>&lt;p&gt;Read the &lt;a href="https://developer.example/llm/"&gt;notes&lt;/a&gt; on pricing.&lt;/p&gt;</description>
+<link>https://mock.invalid/html</link><pubDate>Mon, 01 Sep 2026 10:00:00 PDT</pubDate></item></channel></rss>
+XML
+python3 - "$HT/feed.rss" "$(dirname "$0")/monitor-ai-policy.py" <<'PY' && ok "feed items are matched on visible text, not HTML" || bad "feed items are matched on visible text, not HTML"
+import importlib.util, sys
+spec = importlib.util.spec_from_file_location("m", sys.argv[2]); m = importlib.util.module_from_spec(spec); spec.loader.exec_module(m)
+items = m.parse_rss_feed("file://" + sys.argv[1])
+assert items[0]["title"] == "Tax & price updates", items
+assert items[0]["description"] == "Read the notes on pricing.", items
+assert not m.analyze_announcements(items, ["llm"]), "matched a word that only appears in a link"
+PY
+rm -rf "$HT"
+
echo ""
echo "AI Policy Monitor test suite: $PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ]
diff --git a/scripts/monitor-ai-policy.py b/scripts/monitor-ai-policy.py
index 01717c0..4a07d10 100755
--- a/scripts/monitor-ai-policy.py
+++ b/scripts/monitor-ai-policy.py
@@ -9,6 +9,95 @@ import argparse
import urllib.request
import xml.etree.ElementTree as ET
import json
+import html
+
+
+_COMMENT = r"<!--(?:-?>|.*?--!?>|.*\Z)"
+_BOGUS = r"<(?:[!?]|/(?![A-Za-z]))[^>]*(?:>|\Z)"
+_TAG = r"""</?[A-Za-z](?:[^<>"']|"[^"]*"|'[^']*')*>"""
+HTML_MARKUP = re.compile(
+ _COMMENT
+ + r"|<!\[CDATA\[(.*?)(?:\]\]>|\Z)"
+ + r"""|<(textarea|title)(?=[\t\n\f\r />])(?:[^<>"']|"[^"]*"|'[^']*')*>(.*?)(?:</\2(?=[\t\n\f\r />])(?:[^<>"']|"[^"]*"|'[^']*')*>|\Z)"""
+ + "|"
+ + _BOGUS
+ + "|"
+ + _TAG,
+ re.S | re.I | re.A,
+) # every branch ends at its terminator or at the end, so one left-to-right pass stays linear
+_CDATA_MARKUP = re.compile(_COMMENT + "|" + _BOGUS + "|" + _TAG, re.S | re.I | re.A)
+
+
+_TAG_NAME = re.compile(r"</?([A-Za-z][A-Za-z0-9-]*)", re.A)
+
+
+def _visible_markup(m):
+ """CDATA and textarea or title content is visible text. Inline tags join, other markup separates."""
+ if m.group(1) is not None:
+ return " " + _CDATA_MARKUP.sub(" ", m.group(1)) + " "
+ if m.group(3) is not None:
+ return " " + m.group(3) + " "
+ t = _TAG_NAME.match(m.group(0))
+ return "" if t and t.group(1).lower() in _XHTML_INLINE else " "
+
+
+FEED_NAMESPACES = ("", "http://www.w3.org/2005/Atom", "http://purl.org/rss/1.0/")
+_XHTML_INLINE = {
+ "a", "abbr", "b", "bdi", "bdo", "cite", "code", "data", "del", "dfn", "em", "font", "i",
+ "ins", "kbd", "label", "mark", "q", "s", "samp", "small", "span", "strong", "sub", "sup",
+ "time", "tt", "u", "var",
+} # every other element separates its text, so an unknown block can never join two words
+
+
+def _xhtml_text(elem):
+ """Text of an XHTML tree. Inline elements run on, every other element is separated by a space."""
+ out, stack = [], [(elem, False)]
+ while stack: # explicit stack, so a deeply nested feed cannot exhaust recursion
+ node, closing = stack.pop()
+ name = node.tag.split("}", 1)[-1].lower() if isinstance(node.tag, str) else ""
+ block = name not in _XHTML_INLINE
+ if not closing and name in ("script", "style"):
+ stack.append((node, True)) # never visible, only its tail is
+ continue
+ if closing:
+ if block:
+ out.append(" ")
+ if node is not elem and node.tail:
+ out.append(node.tail)
+ continue
+ if block:
+ out.append(" ")
+ if node.text:
+ out.append(node.text)
+ stack.append((node, True))
+ for sub in reversed(list(node)):
+ stack.append((sub, False))
+ return "".join(out)
+
+
+def _feed_text(child, atom, field):
+ """Atom text is plain unless type says html or xhtml (RFC 4287 3.1.1, 4.1.3).
+ An RSS title is plain text, an RSS description is HTML."""
+ plain = re.sub(r"\s+", " ", child.text or "").strip()
+ if not atom: # an RSS title is text with entities, never markup to strip
+ return html.unescape(plain) if field == "title" else clean_html_text(child.text or "")
+ kind = (child.get("type") or "text").split(";")[0].strip().lower()
+ if kind == "xhtml" or kind.endswith("+xml") and "xhtml" in kind:
+ return re.sub(r"\s+", " ", _xhtml_text(child)).strip()
+ if kind in ("html", "text/html"):
+ return clean_html_text(child.text or "")
+ if "/" in kind and not kind.startswith("text/") and not kind.endswith("xml"):
+ return "" # base64 binary content is not readable text
+ return plain
+
+
+def clean_html_text(raw_text):
+ """Strips raw HTML tags, unescapes entities, and collapses whitespace."""
+ if not raw_text:
+ return ""
+ text = HTML_MARKUP.sub(_visible_markup, raw_text)
+ text = html.unescape(text)
+ return re.sub(r"\s+", " ", text).strip()
# Define default RSS/Atom feed URLs
APPLE_RSS = "https://developer.apple.com/news/rss/news.rss"
@@ -175,20 +264,29 @@ def parse_rss_feed(url):
return tag.split("}", 1)[1]
return tag
+ def ns(e):
+ return e.tag[1:].split("}", 1)[0] if e.tag.startswith("{") else ""
+
for elem in root.iter():
+ if not isinstance(elem.tag, str):
+ continue
tag = clean_tag(elem.tag)
- if tag in ("item", "entry"):
+ if tag in ("item", "entry") and ns(elem) in FEED_NAMESPACES:
title = ""
- desc = ""
+ desc_parts = []
link = ""
pub_date = ""
for child in elem:
+ if not isinstance(child.tag, str) or ns(child) != ns(elem):
+ continue # an extension element never stands in for the feed's own
ctag = clean_tag(child.tag)
if ctag == "title":
- title = child.text or ""
+ title = _feed_text(child, tag == "entry", "title")
elif ctag in ("description", "summary", "content"):
- desc = child.text or ""
+ part = _feed_text(child, tag == "entry", "body")
+ if part:
+ desc_parts.append(part) # summary and content both count
elif ctag == "link":
link_val = child.get("href")
if link_val:
@@ -200,8 +298,8 @@ def parse_rss_feed(url):
items.append(
{
- "title": title.strip(),
- "description": desc.strip() if desc else "",
+ "title": title,
+ "description": " ".join(desc_parts),
"link": link.strip(),
"pubDate": pub_date.strip(),
}
diff --git a/scripts/monitor-test.sh b/scripts/monitor-test.sh
index cddb7f5..bb4efa5 100644
--- a/scripts/monitor-test.sh
+++ b/scripts/monitor-test.sh
@@ -73,6 +73,168 @@ echo "$ERR" | grep -q "sample announcements" && ok "a failed live fetch says the
APPLE_NEWS_RSS_URL="http://127.0.0.1:9/none.rss" $MONITOR --project "$T" --json 2>/dev/null | python3 -c 'import json,sys; json.load(sys.stdin)' && ok "--json stays valid when the fetch fails" || bad "--json stays valid when the fetch fails"
rm -rf "$T"
+# Atom text fields are plain text unless type says html or xhtml (RFC 4287 3.1.1). RSS stays HTML.
+python3 - "$HERE" <<'PY' && ok "Atom plain-text fields keep angle brackets, html and xhtml are stripped, RSS stays HTML" || bad "Atom plain-text fields keep angle brackets, html and xhtml are stripped, RSS stays HTML"
+import importlib.util, os, sys, tempfile, pathlib
+d = sys.argv[1]
+spec = importlib.util.spec_from_file_location("ai", os.path.join(d, "monitor-ai-policy.py"))
+ai = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(ai)
+atom = """<?xml version="1.0"?><feed xmlns="http://www.w3.org/2005/Atom">
+<entry><title type="text">Policy changes for &lt;llm&gt; integrations</title><summary>Plain &lt;b&gt;kept&lt;/b&gt;</summary></entry>
+<entry><title>No type &lt;llm&gt; here</title><summary type="html">&lt;p&gt;Rich &lt;a href="https://x/llm"&gt;body&lt;/a&gt;&lt;/p&gt;</summary></entry>
+<entry><title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Xhtml <b>title</b></div></title><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Inner <a href="https://x/att">text</a></p></div></content></entry>
+</feed>"""
+rss = """<?xml version="1.0"?><rss><channel><item><title>T</title><description>&lt;p&gt;HTML &lt;a href="https://x/llm"&gt;body&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>"""
+tmp = tempfile.mkdtemp()
+fa = pathlib.Path(tmp, "a.xml"); fa.write_text(atom)
+fr = pathlib.Path(tmp, "r.xml"); fr.write_text(rss)
+a = ai.parse_rss_feed(fa.as_uri())
+assert [x["title"] for x in a] == ["Policy changes for <llm> integrations", "No type <llm> here", "Xhtml title"], a
+assert [x["description"] for x in a] == ["Plain <b>kept</b>", "Rich body", "Inner text"], a
+r = ai.parse_rss_feed(fr.as_uri())
+assert r[0]["description"] == "HTML body", r
+assert ai.analyze_announcements([a[0]], ["llm"]), "plain-text <llm> no longer matches"
+edge = """<?xml version="1.0"?><feed xmlns="http://www.w3.org/2005/Atom">
+<entry><title>A</title><content type="text/html">&lt;a href="https://example.org/llm/"&gt;Read&lt;/a&gt;</content></entry>
+<entry><title>B</title><content type="application/xhtml+xml"><div xmlns="http://www.w3.org/1999/xhtml"><h2>Install</h2><p>macOS updates</p></div></content></entry>
+<entry><title>C</title><summary>Keep the llm summary</summary><content src="https://example.org/x"/></entry>
+<entry><title>D</title><content type="text/plain">Plain &lt;llm&gt; kept</content></entry>
+</feed>"""
+fe = pathlib.Path(tmp, "e.xml"); fe.write_text(edge)
+e = ai.parse_rss_feed(fe.as_uri())
+assert e[0]["description"] == "Read", e
+assert e[1]["description"] == "Install macOS updates", e
+assert "llm summary" in e[2]["description"], e
+assert e[3]["description"] == "Plain <llm> kept", e
+inl = '<feed xmlns="http://www.w3.org/2005/Atom"><entry><title>I</title><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>New <span>LL</span>M policy</p><ul><li>One</li><li>Two</li></ul></div></content></entry></feed>'
+fi = pathlib.Path(tmp, "i.xml"); fi.write_text(inl)
+i = ai.parse_rss_feed(fi.as_uri())
+assert i[0]["description"] == "New LLM policy One Two", i
+fs = '<feed xmlns="http://www.w3.org/2005/Atom"><entry><title>F</title><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><fieldset>Install</fieldset><fieldset>macOS updates</fieldset><custom-x>Fill</custom-x><custom-y>Mac</custom-y></div></content></entry></feed>'
+ff = pathlib.Path(tmp, "f.xml"); ff.write_text(fs)
+f = ai.parse_rss_feed(ff.as_uri())
+assert f[0]["description"] == "Install macOS updates Fill Mac", f
+assert not ai.analyze_announcements(f, ["llm"]), "an unlisted block element joined two words"
+X = "http://www.w3.org/1999/xhtml"
+sw = ('<feed xmlns="http://www.w3.org/2005/Atom" xmlns:e="urn:ext">'
+ '<entry><title>S</title><content type="xhtml"><div xmlns="' + X + '"><script>generative AI</script><style>/* llm */</style><p>Pricing changes.</p></div></content></entry>'
+ '<entry><title>Real</title><e:title>generative AI</e:title><e:summary>generative AI</e:summary><summary>Pricing changes.</summary>'
+ '<e:entry><title>generative AI fake</title></e:entry></entry>'
+ '<entry><title>M</title><content type="text/html; charset=utf-8">&lt;a href="/llm/"&gt;Read&lt;/a&gt;</content></entry>'
+ '<entry><title>B</title><content type="application/octet-stream">aiAA</content></entry>'
+ '</feed>')
+fw = pathlib.Path(tmp, "w.xml"); fw.write_text(sw)
+w = ai.parse_rss_feed(fw.as_uri())
+assert [x["title"] for x in w] == ["S", "Real", "M", "B"], w
+assert [x["description"] for x in w] == ["Pricing changes.", "Pricing changes.", "Read", ""], w
+assert not ai.analyze_announcements(w, ["generative ai", "llm", "ai"]), "script, a foreign element, MIME parameters or binary content matched"
+rt = '<rss><channel><item><title>New &lt;generative AI&gt; rules</title><description>&lt;p&gt;artificial&lt;em&gt;intelligence&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>'
+fx = pathlib.Path(tmp, "x.xml"); fx.write_text(rt)
+x = ai.parse_rss_feed(fx.as_uri())
+assert x[0]["title"] == "New <generative AI> rules", x
+amp = '<rss><channel><item><title>Tax &amp;amp; price updates</title><description>x</description></item></channel></rss>'
+fq = pathlib.Path(tmp, "q.xml"); fq.write_text(amp)
+assert ai.parse_rss_feed(fq.as_uri())[0]["title"] == "Tax & price updates"
+spec2 = importlib.util.spec_from_file_location("mon2", os.path.join(d, "monitor.py"))
+mon = importlib.util.module_from_spec(spec2)
+spec2.loader.exec_module(mon)
+assert "In-App Purchase policies" in mon.match_announcement_to_tracks({"title": "Policy changes for <StoreKit>", "description": ""}), "an RSS title lost its literal text"
+assert x[0]["description"] == "artificialintelligence", x
+for fn in (ai.clean_html_text,):
+ assert fn("<p>Hello</p><p>World</p>") == "Hello World", fn
+assert ai.analyze_announcements(i, ["llm"]), "an inline element split a keyword"
+assert not ai.analyze_announcements([e[0]], ["llm"]) and not ai.analyze_announcements([e[1]], ["llm"]), "markup or joined blocks made a false llm match"
+PY
+
+# A feed full of unmatched angle brackets must not make tag stripping quadratic.
+python3 - "$HERE" <<'PY' && ok "HTML stripping stays linear on unmatched angle brackets" || bad "HTML stripping stays linear on unmatched angle brackets"
+import importlib.util, os, sys, time
+d = sys.argv[1]
+def load(name, path):
+ spec = importlib.util.spec_from_file_location(name, path)
+ m = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(m)
+ return m
+mon = load("mon", os.path.join(d, "monitor.py"))
+ai = load("ai", os.path.join(d, "monitor-ai-policy.py"))
+for fn in (mon.strip_html, ai.clean_html_text):
+ t = time.time()
+ fn("<" * 200000)
+ assert time.time() - t < 1.0, fn.__name__
+ assert fn("<p>a</p> <b>b</b>") == "a b"
+ assert fn('<a href="https://developer.example/llm/att" title="x < y">Read notes</a>') == "Read notes", fn.__name__
+ t = time.time()
+ fn('<a "' * 50000)
+ assert time.time() - t < 1.0, fn.__name__
+ assert fn("<!-- \" app tracking transparency -->Normal update") == "Normal update", fn.__name__
+ assert fn("<!-- Don't publish -->Privacy manifests: developers' guide > old approach") == "Privacy manifests: developers' guide > old approach", fn.__name__
+ t = time.time()
+ fn("<!--" * 100000)
+ assert time.time() - t < 1.0, fn.__name__
+ assert fn('<a title="<!--">App Review Guidelines changed</a>') == "App Review Guidelines changed", fn.__name__
+ for ending in ("<!-->", "<!--->", "<!--x--!>"):
+ assert fn(ending + "Privacy manifests") == "Privacy manifests", (fn.__name__, ending)
+ assert fn("Kept <!-- never closed") == "Kept", fn.__name__
+ for hostile in (('<a "' + "<!--") * 50000, ("<!--x-->" + '<b "') * 40000, ("<a '" + '"') * 60000):
+ t = time.time()
+ fn(hostile)
+ assert time.time() - t < 1.0, (fn.__name__, hostile[:12])
+ for markup in ("<svg><text><![CDATA[Privacy manifests]]></text></svg>", "<textarea><!--</textarea>Privacy manifests", '<!x ">Privacy manifests">', "<TITLE>Privacy manifests</title>", "<![CDATA[<b>Privacy manifests</b>]]>"):
+ assert "Privacy manifests" in fn(markup), (fn.__name__, markup, fn(markup))
+ assert "<b>" not in fn("<![CDATA[<b>Privacy manifests</b>]]>"), fn.__name__
+ assert "Privacy" not in fn('<textarea-x><a href="Privacy manifests">Read notes</a></textarea-x>'), fn.__name__
+ assert "Privacy manifests" in fn("<textarea-x>Privacy <b>manifests</b></textarea-x>"), fn.__name__
+ assert fn("<textarea>Privacy</textarea/><!-- hidden -->Next") == "Privacy Next", fn.__name__
+ assert "Privacy manifests" in fn("<textarea>Kept</textarea" + chr(160) + "><!-- Privacy manifests -->Next"), fn.__name__
+ assert "Privacy" not in fn("<t" + chr(305) + "tle><a href=\"Privacy manifests\">Read notes</a></t" + chr(305) + "tle>"), fn.__name__
+ for hostile in ("<textarea>" * 50000, "<![CDATA[" * 50000, "<!x" * 100000, "<title a='" * 40000, "<![CDATA[<!--" * 40000):
+ t = time.time()
+ fn(hostile)
+ assert time.time() - t < 1.0, (fn.__name__, hostile[:12])
+PY
+# Issue 833. Keywords match whole words on the visible text, not substrings of HTML.
+T="$(mktemp -d)"
+python3 - "$T/news.json" <<'PY'
+import json, sys
+items = [
+ ("Display and platform updates", "<p>New <a href=\"https://developer.example/design/\">display</a> sizes on all platforms and marketplaces. Translations improved.</p>"),
+ ("Retail-related pattern changes", "<p>Pay attention to the new retail-related pattern for administrators.</p>"),
+ ("Updated PLA now available", "<p>The updated PLA is ready to review.</p>"),
+ ("SLA update", "<p>Review the new SLA.</p>"),
+ ("Updated review guidelines", "<p>The App Review Guidelines have changed.</p>"),
+ ("Patched vulnerabilities", "<p>Several vulnerabilities are fixed in this release.</p>"),
+ ("In-app purchasing changes", "<p>New rules for in-app purchasing.</p>"),
+ ("Tracking API", "<p>ATTrackingManager authorization changes.</p>"),
+ ("Camera key", "<p>Update NSCameraUsageDescription strings.</p>"),
+ ("Location API", "<p>CLLocationManager authorization changes.</p>"),
+ ("StoreKit2 update", "<p>New StoreKit2 APIs.</p>"),
+ ("WCAG2.2 alignment", "<p>Apps should meet WCAG2.2.</p>"),
+]
+json.dump([{"title": t, "description": d, "pubDate": "Mon, 01 Sep 2026 10:00:00 PDT", "link": "https://mock.invalid/833/%d" % i}
+ for i, (t, d) in enumerate(items)], open(sys.argv[1], "w"))
+PY
+$MONITOR --project "$T" --news-file "$T/news.json" --json 2>/dev/null | python3 -c '
+import json, sys
+by = {}
+for i in json.load(sys.stdin):
+ by.setdefault(i["announcement_title"], set()).add(i["track"])
+lic = "Apple Developer Program License Agreement"
+assert lic not in by.get("Display and platform updates", set()), by
+assert not by.get("Retail-related pattern changes"), by
+assert lic in by.get("Updated PLA now available", set()), by
+assert lic in by.get("SLA update", set()), by
+assert "App Store Review Guidelines" in by.get("Updated review guidelines", set()), by
+assert "Security updates" in by.get("Patched vulnerabilities", set()), by
+assert "In-App Purchase policies" in by.get("In-app purchasing changes", set()), by
+assert "App Tracking Transparency" in by.get("Tracking API", set()), by
+assert "Camera and microphone permissions" in by.get("Camera key", set()), by
+assert "Location permissions" in by.get("Location API", set()), by
+assert "In-App Purchase policies" in by.get("StoreKit2 update", set()), by
+assert "Accessibility requirements" in by.get("WCAG2.2 alignment", set()), by
+' && ok "keywords match whole words on stripped text (issue 833)" || bad "keywords match whole words on stripped text (issue 833)"
+rm -rf "$T"
+
echo ""
echo "monitor-test: $PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ]
diff --git a/scripts/monitor.py b/scripts/monitor.py
index f9f0483..70b8f62 100644
--- a/scripts/monitor.py
+++ b/scripts/monitor.py
@@ -4,6 +4,7 @@ categories against live/mock news and scans a --project for impact."""
import os
import sys
+import html
import re
import json
import urllib.request
@@ -129,7 +130,7 @@ TRACK_METADATA = {
"release_impact": "Critical",
},
"App Tracking Transparency": {
- "keywords": ["app tracking transparency", "att", "idfa", "user tracking"],
+ "keywords": ["app tracking transparency", "att", "idfa", "user tracking", "attrackingmanager", "requesttrackingauthorization"],
"patterns": [
r"app[ -]tracking[ -]transparency",
r"att",
@@ -166,7 +167,7 @@ TRACK_METADATA = {
"purchase policy",
],
"patterns": [
- r"in-app[ -]purchase",
+ r"in-app[ -]purchas(?:e|es|ing)",
r"iap",
r"storekit",
r"subscription[ -]term",
@@ -409,7 +410,7 @@ TRACK_METADATA = {
],
"patterns": [
r"security[ -]update",
- r"vulnerability",
+ r"vulnerabilit(?:y|ies)",
r"cve",
r"encryption[ -]declaration",
],
@@ -666,36 +667,58 @@ def scan_target_repo(repo_path, track_name, metadata):
return affected_files, verdict
+_COMMENT = r"<!--(?:-?>|.*?--!?>|.*\Z)"
+_BOGUS = r"<(?:[!?]|/(?![A-Za-z]))[^>]*(?:>|\Z)"
+_TAG = r"""</?[A-Za-z](?:[^<>"']|"[^"]*"|'[^']*')*>"""
+HTML_MARKUP = re.compile(
+ _COMMENT
+ + r"|<!\[CDATA\[(.*?)(?:\]\]>|\Z)"
+ + r"""|<(textarea|title)(?=[\t\n\f\r />])(?:[^<>"']|"[^"]*"|'[^']*')*>(.*?)(?:</\2(?=[\t\n\f\r />])(?:[^<>"']|"[^"]*"|'[^']*')*>|\Z)"""
+ + "|"
+ + _BOGUS
+ + "|"
+ + _TAG,
+ re.S | re.I | re.A,
+) # every branch ends at its terminator or at the end, so one left-to-right pass stays linear
+_CDATA_MARKUP = re.compile(_COMMENT + "|" + _BOGUS + "|" + _TAG, re.S | re.I | re.A)
+
+
+def _visible_markup(m):
+ """CDATA and textarea or title content is visible text. Everything else is markup."""
+ if m.group(1) is not None:
+ return " " + _CDATA_MARKUP.sub(" ", m.group(1)) + " "
+ if m.group(3) is not None:
+ return " " + m.group(3) + " "
+ return " "
+
+
+def strip_html(text):
+ """Feed descriptions carry HTML. Match on the visible text only."""
+ text = HTML_MARKUP.sub(_visible_markup, text or "")
+ return re.sub(r"\s+", " ", html.unescape(text)).strip()
+
+
+def term_regex(term):
+ """Short terms match as words ("pla" never fires on "display", #833); a version may follow ("wcag2.2").
+ Terms of 8 or more characters match inside identifiers ("NSCameraUsageDescription", "CLLocationManager")."""
+ if len(term) >= 8:
+ return re.compile(r"(?:" + term + r")", re.IGNORECASE)
+ return re.compile(r"(?<![a-z0-9])(?:" + term + r")(?:s|es)?(?![a-z])", re.IGNORECASE)
+
+
def match_announcement_to_tracks(announcement):
"""
Checks if a news item matches any of the 25 tracks based on keyword and regex matching.
Returns a list of matched track names.
"""
matched = []
- title = announcement.get("title", "").lower()
- desc = announcement.get("description", "").lower()
+ title = re.sub(r"\s+", " ", html.unescape(announcement.get("title", ""))).lower() # RSS title is text
+ desc = strip_html(announcement.get("description", "")).lower()
combined = f"{title} {desc}"
for track, meta in TRACK_METADATA.items():
- # 1. Keyword direct check
- keyword_match = False
- for kw in meta["keywords"]:
- if kw in combined:
- keyword_match = True
- break
-
- if keyword_match:
- matched.append(track)
- continue
-
- # 2. Pattern regex check
- pattern_match = False
- for pat in meta["patterns"]:
- if re.search(pat, combined, re.IGNORECASE):
- pattern_match = True
- break
-
- if pattern_match:
+ terms = [re.escape(kw) for kw in meta["keywords"]] + list(meta["patterns"])
+ if any(term_regex(t).search(combined) for t in terms):
matched.append(track)
return matched
diff --git a/scripts/test-deadline-checker.py b/scripts/test-deadline-checker.py
index 7787e96..b825c3d 100755
--- a/scripts/test-deadline-checker.py
+++ b/scripts/test-deadline-checker.py
@@ -172,7 +172,8 @@ class TestDeadlineDayBoundary(unittest.TestCase):
with tempfile.TemporaryDirectory() as tmp:
out_md = os.path.join(tmp, "timeline.md")
self._run("generate-timeline.py", {"DEADLINES_FILE": self._db(tmp), "TIMELINE_OUTPUT_FILE": out_md})
- text = open(out_md).read()
+ with open(out_md, "r") as f:
+ text = f.read()
row = {}
for line in text.splitlines():
for name in ("Due Today Act", "Due Tomorrow Act", "Due Yesterday Act"):