* feat(guard): read single-quoted and template-literal JS strings in the staging check
When Node is on the path and the scanned app has @babel/parser (Metro
brings it), one Node process parses the shipped JS and TS files and
reports strings in every quote style. Comments, JSX text, regex
literals, import paths and type-only TS and Flow code are never read as
strings. The new quote styles only count in files that can ship, not in
test files, test folders or tool configs. Without Node or the parser, or
for a file Babel cannot parse, the double-quoted grep runs as before.
Closes #2402.
* fix(guard): treat require() and import() paths as module paths in the staging check
The first argument of require(), require.resolve() and a dynamic import()
names a module, like the source of a static import, so it is no longer
read as a release string. Tests js-21 to js-24.
* fix(guard): only require.resolve() with a string literal names a module path
The member case read the first argument of any require.<member>() call
as a module path. RequireJS, common in Cordova apps, configures its
loader with require.config(), whose first argument is an options object
that can hold a real backend URL, so a double-quoted URL there that main
reports went silent. Only a non-computed require.resolve() whose first
argument is a string literal is now treated as a module path.
Tests js-25 and js-26 (a URL in require.config(), double- and
single-quoted) fail before this change and pass after; js-27 keeps a
single-quoted require.resolve() path silent.
* fix(guard): skip only plain module specifiers in the staging check
* fix(guard): a string in a module path counts only when it is a URL
* fix(guard): a host inside a module path built around a URL still counts
A template literal or + concatenation in a module path whose fixed text starts with a scheme or //, or contains ://, is a URL, so the strings inside it are read as hosts (#2423 review).
* fix(guard): a string nested in a call, object or array inside a module path is read as before
The module path suppression reached every string under the first argument
of import(), require() and require.resolve(), so in
import(url("staging.acme.io")) the host passed to url() went silent while
main reports it. A string now counts as a module path only when it is that
argument or a static import or export source, or a direct piece of one: a
piece of a template or + concatenation, a branch of ?: or a || fallback,
or an item of an AMD require([...]) list. A string inside a nested call,
object or array is read as before.
Tests js-43 to js-46 fail before this change and pass after. js-47 and
js-48 keep a conditional and a fallback module path silent, as on main.
* fix(guard): load @babel/parser only from a trusted path and read module paths by shape
The guard no longer resolves @babel/parser from the scanned app, since loading it
runs code the app controls. It uses BABEL_PARSER_DIR or the global npm root, refuses
a copy inside the scanned folder, and falls back to the double-quoted grep without
one. APP_STORE_GUARD_TRUST_PROJECT_BABEL=1 opts in to the app's own copy.
A string counts as a module path only when the argument visibly resolves to a file
path: a literal, a template or + concatenation led by . or / or __dirname, or an
argument to path.join or path.resolve. Any other shape is reported, as on main.
- A host after a scheme held in a variable in an import() template fires again.
- A path.join() file name inside require() no longer reports a staging host.
* fix(guard): leave no node-compile-cache in TMPDIR when looking up the global parser
npm root -g turns on Node's module compile cache, which writes
node-compile-cache into $TMPDIR. js_parser runs it on every scan without
BABEL_PARSER_DIR, so 612-22 (a multi-app scan leaves no temp files) failed
in CI on f9024da. The lookup now runs with NODE_DISABLE_COMPILE_CACHE=1.
* fix(guard): scan backslash file names and skip dev-only configs and module path calls
A file name with a backslash was never matched in the parser output, so it
was skipped. The path now reaches awk through ENVIRON, and a file with no
parser row falls back to the double-quoted grep.
Single-quoted hosts no longer fire in next, vue, nuxt, svelte, astro,
storybook, stories and test setup files, which never ship. They also no
longer fire in the first argument of new URL with import.meta.url,
import.meta.glob and resolve, require.context, jest and vi mocks, or in a
require path built from a dir variable that ends in a source file name.
Hosts in those calls, in factories, and in URLs built from a scheme still
fire.
* test: quote the empty BABEL_PARSER_DIR so shellcheck reads it as an assignment
* fix(guard): read build configs in full and skip only dev-only localhost shapes
Build configs (next, vue, nuxt, svelte, astro, vite, webpack, rollup, babel,
metro) can put values in the shipped bundle, so they are no longer fully
exempt. Only strings under a devServer or proxy key are skipped there, and
only when the config sits at the scan root or a package root. Test, lint and
style tool configs keep their exemption on the same root rule. setupJest and
src/mocks join the test-only files.
A localhost that is not a backend is skipped in any quote style: one compared
with hostname or passed to hostname.includes, a capacitor:// or ionic://
localhost origin, and the true branch of __DEV__ or NODE_ENV development.
New tests pin the compile-cache env, the 4 MB parser cap and the fallback for
a file the parser returns no row for.
* fix(guard): read more dev-only JS and TS files for double quotes only, as on main
Test configs (jest, vitest, karma, wdio, .config or .conf) count as dev-only
wherever they live. proxy.conf, webpack.dev and webpack.local count at a scan or
package root, and src/setupProxy under one. Angular environment.development,
.dev and .local are dev-only. The base environment.ts is dev-only only when an
angular.json or project.json swaps it for environment.prod.ts in production. A
production or staging environment file is still read in full.
Bare localhost hosts keep firing in both quote styles, as the double-quoted
form does on main.
* fix(guard): note when JS strings were read for double quotes only, and skip Vite dev server and test settings
* fix(guard): skip only Vite server, preview and test keys, not computed keys or helper objects
* docs(changelog): move the JS strings entry to Unreleased and credit the contributor
* fix(guard): skip dev keys only at the top of the exported config, read import = require() and hostname-compared calls
* fix(guard): treat only devServer as dev config, follow config function returns, keep the parser trust boundary at the scan root
* fix(guard): skip dev settings passed by name or assigned, dev-only webpack configs and craco devServer; document the parser in the safety notes
* refactor(guard): read build configs for double-quoted strings only, as main does; refuse a parser in a linked app folder
* test(guard): a parser in a linked app folder outside the scan root is refused
* fix(guard): refuse a parser in any linked app, read dev-only branches and AMD paths as main does
* fix(guard): resolve app roots, read Nx and dev-only RN configs as before, skip import-equals paths, keep npm quiet
* fix(guard): drop the Vite mode test, read define values and self-bound __DEV__ as app values, accept boolean dev tests
* fix(guard): count method and constructor parameters as bindings, skip src/proxy.conf, read glob lists, worker file names and literal JSX children as paths and text
* fix(guard): keep URL JSX children, count enum and namespace names, read a file-bound process as a value, and treat accessibility and title text as shown text
* fix(guard): count import-equals names, read sentences in new quote styles as shown text, and keep bare-host JSX children
* fix(guard): trust only top-level dev aliases, read a file-declared require or define as a call, and count staging names only when they read as hosts
* fix(guard): read a quoted payload as code, honour an app-defined includes, and skip RegExp and replace search patterns
---------
Co-authored-by: mjmirza <support@mirzaiqbal.com>
21 KiB
Questions from X, answered
When the playbook spread on X in November 2026, about 300 people replied. These are the questions they asked about the tool itself, each answered in full here and as an accepted answer in the Q&A discussions, so you can reply with a correction or a follow-up.
Questions about one person's own rejection were left to that person. The patterns behind them are covered in the last answers below.
Is the App Store Compliance guard safe to install and run?
Fair question, and stars prove nothing. Check it yourself in a few minutes.
- The guard is one Bash file. It reads your project, uses temporary scan buffers that it removes, makes no network call, and never changes your app. If
~/.claude/hooks/hook-log.shexists, it loads that helper to log errors and overrides. scripts/install.shwrites into~/.claude(or$CLAUDE_CONFIG_DIR). the hook, the skill folder, one command file, and a hook entry insettings.json. It backs upsettings.jsonfirst assettings.json.bak-<timestamp>.bash scripts/install.sh install --dry-runprints every change and writes nothing.doctorchecks the install,uninstallremoves it.- Neither the installer nor the guard calls curl or wget.
scripts/monitor.pyfetches Apple's public developer feed by default; pass--mock,--simulateor--news-fileto stay offline. The Android, AI policy and privacy monitors fetch only with--live. - The guard never runs code from the project it scans. To read JS and TS strings it loads
@babel/parserfromBABEL_PARSER_DIRor the global npm root, and refuses a copy inside the scanned folder or a linked app folder. Without one it reads double-quoted strings only, and the report says so in one note line, with no change to the exit code. SetAPP_STORE_GUARD_TRUST_PROJECT_BABEL=1to use the copy in your own app'snode_modules, only for a project you trust. - Want more isolation? Run it in a container or a VM.
Section 8 of docs/WHAT-THE-SCAN-PROVES.md lists what each script touches.
Discussion. #2344
Does it cover Google Play and Android, or only the App Store?
Both stores. Of the 127 rejection patterns, 63 are Apple, 45 are Google Play, 13 apply to both, and 6 are web.
On an Android project the guard checks, among others.
- Sensitive permissions. background location, all files access, SMS and call log, accessibility service, and photo and video access, each flagged so you can justify it. The guard cannot see your Play Console declarations.
- Play Billing for digital goods, Billing Library below version 8, and donation links.
- Target API level below the current floor, and 64-bit ABIs missing next to 32-bit ones.
- Analytics or ad SDKs that mean your Data safety form needs a second look.
- A debuggable release build, and a
specialUseforeground service missing its subtype property.
What no scan can check. whether your Play screenshots match the build, and the 12 testers for 14 days rule for new personal accounts. Both are in docs/GOOGLE-PLAY.md and the pre-submission checklist.
Discussion. #2345
Does it check Mac App Store, watchOS, tvOS or visionOS apps?
Partly, and honestly less than iOS.
- The guard has no macOS, watchOS, tvOS or visionOS specific checks. Code shared with an iOS target is scanned the same way, and a watchOS-only or visionOS-only workspace is treated as iOS.
- The Mac App Store rules from Guideline 2.4.5 (sandboxing, self-contained packaging, no auto launch, no root escalation, no downloading other code) are documented in
docs/BY-APP-TYPE.mdandreferences/guidelines/by-app-type/macos-and-the-mac-app-store.md, as a checklist you apply by hand. - Notarization for apps shipped outside the Mac App Store, and the visionOS, watchOS and tvOS specifics, are in
docs/PLATFORM-MECHANICS-2026.md.
If Mac checks matter to you, open an issue with the rejection you hit. Real cases decide what gets automated next.
Discussion. #2346
Does every finding cite the exact guideline number and the file and line?
File and line mostly yes, guideline number not on every finding yet.
- Each finding prints its severity, an ID, a title, and a fix line. Most checks also print
file. path:line, the first place the risky code was found. Project-wide checks, such as a missing privacy policy URL, have no single line to point at. - Many IDs carry the guideline number, for example
APPLE-5.1.1-NO-ACCOUNT-DELETION, and some fix lines quote it, such as Apple 5.1.1(v). - Every pattern in
data/rejection-patterns.jsonhas aguidelinefield, but the guard does not print it on the finding yet, and not every pattern maps to one numbered rule.
Printing the guideline on every finding is a fair request and is on the list. Until then, look up the ID in data/rejection-patterns.json or the docs.
Discussion. #2347
Does it check the privacy policy and account data, or only the code?
It covers the parts that leave a trace in the project, and asks you to confirm the rest.
What the guard checks.
- A privacy policy reference in the scanned source, for Apple and Google Play. Whether the link in the app opens and works is a manual check.
- Account deletion inside the app when the app creates accounts, and a weak version of it (only a mailto link or a deactivate button).
- A privacy manifest when required reason APIs are used, and its contents, with
scripts/validate-privacy-manifest.py. - Tracking SDKs without App Tracking Transparency, and SDKs that mean your Apple privacy labels or Play Data safety form need review.
What only you can confirm. that the policy text is accurate, that the privacy labels match what the app really sends, and that deletion works on a real device. Check the policy text with the pre-submission checklist. Since 2.5.0 the readiness file .app-review-readiness.json records the privacy labels against runtime and account deletion on a real device, and a check marked fail blocks the submit.
Discussion. #2348
Can the guard catch subtle design guideline violations?
Mostly the second kind, and here is the honest line.
- Design checks it does run. Sign in with Apple offered next to other social logins, relay email handling, thin web wrappers (4.2), social login without a privacy-friendly option (4.8), and a set of accessibility checks. Live Activity spam is documented with a manual detection recipe, and the guard does not check it.
- Some heuristics flag risks that are easy to miss, for example a button titled Allow before the permission prompt, HealthKit used in an app that also uses iCloud storage, or an iOS deployment target below 13. The HealthKit finding asks you to confirm by hand that no health data reaches iCloud (5.1.3(ii)).
- What it cannot judge. layout, visual polish, whether screens look consistent, and iPad layout. Those need a person on a device.
docs/WHAT-THE-SCAN-PROVES.md section 5 lists reported rejections and marks each as caught, partial, or not covered.
Discussion. #2349
How many of the rules can a static scan actually check?
That is exactly right, and the tool is built around saying so.
- 116 of the 127 patterns have a detection recipe in
data/detection-recipes.json. Some of the rest, such as device frames in a preview video or the Play 12-tester rule, cannot be seen in code at all. A few are checked by the guard directly, without a recipe. - Having a recipe does not mean the guard runs it. Some recipes are guidance for a person.
- For what a scan cannot prove, 2.5.0 added
.app-review-readiness.json. You record seven checks (demo account, live backend, review notes, screenshots of this build, deletion on a real device, privacy labels against runtime, a reachable purchase). A fail blocks, and with no file the report lists what it could not see. - A scan that could not run says NOT CHECKED instead of passing. Set
APP_STORE_GUARD_BLOCK_UNCHECKED=1to make that block too, andAPP_STORE_GUARD_REQUIRE_READINESS=1(or"enforce": truein the readiness file) to make an open readiness check block. Some unavailable checks, such as a missing manifest validator, stay warnings.
The honesty you mention is the point. The tool reports what it could not verify instead of hiding it.
Discussion. #2350
Does it check different things depending on the type of app?
There is no app type setting. Checks fire on what is in your code, so a game, a health app and a VPN get different findings.
- Examples. loot boxes and gambling for games, HealthKit with iCloud for health apps, betting code, and organization registration for VPN, health and finance apps on Google Play.
docs/BY-APP-TYPE.mdlists what reviewers expect for ten types. every app, subscriptions and in-app purchase, social and user content, kids, health, games, macOS, AI, crypto and finance, and VPN. Each has a longer guide inreferences/guidelines/by-app-type/.
How it runs. the guard reads your project, detects the platform and framework (native, Flutter, React Native, Expo, Ionic, Unity), runs the matching checks, and sorts the code findings by severity. As a hook it runs automatically before a submit command.
Discussion. #2351
Can it scan permissions requested inside third-party SDKs?
Partly.
- The guard finds known SDKs by name in scanned files (package.json, Gradle files, source imports) and flags the ones with known consequences, such as tracking SDKs that need App Tracking Transparency or SDKs that change your Data safety answers.
- An SDK declared only in a Podfile is not detected.
- The main source scan skips
Pods,node_modulesand vendored folders, and the guard does not fully audit transitive SDK permissions or each SDK's own privacy manifest. That is the vendor's job, but you are the one rejected if it is wrong. - To see which dependency added an Android permission, check the merged manifest. See the Q&A on which dependency added a sensitive permission to the merged manifest.
Section 5 of docs/WHAT-THE-SCAN-PROVES.md rates SDK permissions as partial for this reason.
Discussion. #2352
Does the hook run before fastlane, or only when an AI agent submits?
Only on commands your AI agent runs. A command you type in a terminal, or one your CI runs, never passes through the hook.
- The hook matches submit-shaped commands the agent is about to run, such as
fastlane deliver,fastlane pilot,eas submit,xcrun altool,xcodebuild archive, GradlebundleRelease, andflutter build ipa. - For your own fastlane lane or CI, call the guard yourself before the upload, for example
sh("bash path/to/app-store-compliance-guard.sh .")in abefore_allblock. It exits 2 on a critical finding, so the lane stops. - Exit codes. 0 clear, 2 blocked, 1 not checked when run by hand.
Section 7 of docs/WHAT-THE-SCAN-PROVES.md has the CI and fastlane recipe.
Discussion. #2353
Does it cover Huawei AppGallery and the Chinese Android stores?
As documentation, not as automated checks.
docs/OTHER-STORES.mdcovers Huawei AppGallery and the Chinese Android stores, including the MIIT app filing, the ICP filing, and how long ICP filing takes.docs/GLOBAL-REGULATORY-2026.mdtracks China deadlines, including Apple's new China mainland App Compliance declarations due by 31 January 2027 for existing apps.- The guard has no checks specific to the Chinese stores. You apply those gates by hand.
If you ship to these stores and can share a rejection reason, open an issue. That is how a manual gate becomes a check.
Discussion. #2354
When Apple or Google change the rules, how fast does the playbook follow?
It checks a dated snapshot, and tells you how old it is.
- Every report opens with a
Rule pack.line, the version and the oldest and newest date its sources were verified. Past 60 days it printsRule pack STALE. - Every deadline in
data/regulatory-deadlines.jsonrecords its source URL and the day it was verified, and itssource_notesays plainly when the source is secondary or the primary text was not read.scripts/verify-citations.pychecks that cited pages respond and are not soft 404s, and reports blocked or failing pages for follow-up. - New rules have shipped within days. 2.5.0 added Apple's November developer emails, and 2.5.1 adds Apple's China mainland compliance declarations.
- To update, run
git pullin the repo, then the same install command again.
There is no scheduled job that rewrites rules automatically, on purpose. Every change is read by a person first.
Discussion. #2355
Has the guard been tested on real App Store submissions?
Honest answer. it is tested heavily as software, and the real-world evidence so far is reports, not a published study.
- The guard has regression tests covering many of its checks and the failure shapes people reported, and CI runs the suite on every pull request to main and every push to main.
evals/gold-cases.jsonscores the Fleet Sweep, Waiver Ledger and Ruling Register against fixed expected verdicts. Those are synthetic cases, not real apps.- People have reported first-try approvals after running it, and others reported rejections it would not have caught. Those reports shaped 2.5.0.
- A clear result is not an approval. It means no critical risk was found. High and medium findings can still be listed.
If you run it before a submission, please post the outcome either way. A published record of real results is the next thing worth building.
Discussion. #2356
How long does App Store review take, and can I get reviewed faster?
Apple says at least half of submissions are reviewed in under 24 hours and 90 percent in under 48 hours. Developers report anything from the same day to five weeks, longest for a first app and for the round after a rejection.
What actually helps.
- Do not resubmit while waiting. It can send you to the back of the queue.
- For a critical bug fix, request an expedited review in App Store Connect with the steps to reproduce the bug.
- Avoid the round after a rejection. A working demo account and clear review notes remove the most common reasons.
The tool cannot speed up the queue. It can make it less likely you join it twice. See also #2230.
Discussion. #2357
What should App Review notes say so the reviewer actually uses them?
Reviewers have a few minutes per app, so notes that need reading fail. Notes that give steps work.
- Lead with what to tap. a numbered path to each feature the reviewer must see, not a description of the feature.
- A demo account that works on the release build, without 2FA, plus any code or hardware it needs.
- A short screen recording of the non-obvious flow. It beats paragraphs, especially after a rejection.
- Say what is unique and who it is for in two lines. That is the part that answers 4.3 questions.
The template is templates/REVIEW-NOTES-TEMPLATE.md, and the appeal steps are in docs/MISTAKE-PATTERNS.md. See also #2232.
Discussion. #2358
After a rejection, should I change the binary, the listing, or the account?
Change the thing the rejection names, and nothing else at the same time.
- Read the guideline number in the rejection. 2.3 is the listing (screenshots, description, metadata), 5.1 is privacy and data, 3.1 is payments, 4.x is the app itself. That tells you where to look.
- Never resubmit unchanged. Fix it, or reply in Resolution Center if you think the reviewer misread the app, with steps and a screen recording.
- On Google Play, when the rejection cites a Data safety mismatch or an SDK or permission, correct the form or remove the offending SDK or permission before you resubmit, rather than arguing.
- Do not resubmit in parallel, and do not create a new account to get around a rejection. An account-level action can only be appealed, never worked around.
The appeal playbook in docs/MISTAKE-PATTERNS.md has the steps for both stores.
Discussion. #2359
How do I show free trial text only to users still eligible for the intro offer?
Check eligibility before the paywall renders, and only then say free trial.
- StoreKit 2.
Product.SubscriptionInfo.isEligibleForIntroOffer, orisEligibleForIntroOffer(for:)on the subscription group. - RevenueCat on iOS.
checkTrialOrIntroDiscountEligibility(product: package.storeProduct), and show trial wording only for.eligible. - An ineligible user sees the full price. Telling them free trial when they would be charged is a misleading pricing rejection under 3.1.2.
- The billed amount must also be at least as prominent as any per-month breakdown.
The guard does not scan for this. It is a line in docs/PRE-SUBMISSION-CHECKLIST.md and guidance in docs/WHAT-THE-SCAN-PROVES.md section 5.
Discussion. #2360
Does it catch device frames in App Preview videos?
It is documented, but no scan can check it, because the video is not in your code.
- Pattern
APPLE-2.3.4-DEVICE-FRAMES-PREVIEW. App Previews must show captured app footage only, without device frames, hands, or footage from outside the app. - It is listed in
docs/BY-APP-TYPE.mdandreferences/rules/metadata.md. - The pre-submission checklist names it directly next to the screenshot items, because developers reported exactly this rejection.
Since 2.5.0, screenshots_match_build in .app-review-readiness.json is where you record that your screenshots and previews are current and clean.
Discussion. #2361
What does the OpenRoots ORA 2.3 license mean for me?
In plain words, from the LICENSE pointer file.
- Free and unconditional for any individual, nonprofit, school, or government body at any size, and for any company at or below USD 20,000,000 annual revenue.
- Above that threshold, 0.5 percent of the amount by which attributable revenue exceeds the threshold, capped at USD 250,000 per year, self-reported quarterly.
- AI training is not granted by either tier. It needs a separate licence.
The canonical licence text, linked from LICENSE, is the one that applies. This summary is not legal advice.
Discussion. #2362
What do people actually get rejected for, and would this have caught it?
From the rejections people described in the replies, the most common were.
- Permission wording. an onboarding button saying Allow before the system prompt. Caught by
APPLE-5.1.1-PRE-PROMPT-ALLOW-BUTTONsince 2.5.0. - Missing permission purpose strings. Caught for the APIs the guard knows. Whether a purpose string is specific enough is a manual check.
- A demo account that did not work, or a backend that was down during review. Not visible in code, so it goes in
.app-review-readiness.json. - 4.3 spam or duplicate app. No scan can decide it. See #2340.
- Device frames in a preview video, and screenshots from an older build. Manual items on the checklist.
Section 5 of docs/WHAT-THE-SCAN-PROVES.md maps each reported rejection to the check that catches it, or marks it as a gap. If yours is not there, reply with the guideline number.
Discussion. #2363
Which checks run first, and is there a rule that screenshots match the app one to one?
There is no single first rule. The guard runs every check and sorts the code findings by severity, critical first. Readiness findings follow in their own block.
The order it scans in. it lists the project files, detects the platforms and framework, then runs the iOS, Android and web checks that apply.
If by 1:1 you mean screenshots and the UI matching the real app exactly, that is a real review rule, and it is not something a code scan can see. It is a manual item. record it as screenshots_match_build in .app-review-readiness.json, where a fail blocks the submit.
Discussion. #2367