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.

feat: implement Play API metadata pull, per-country gambling matrix

mjmirza1c59fba34c2d
diff --git a/README.md b/README.md
index a2ccaf7..f54425d 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,7 @@ bash agent-os/hooks/app-store-compliance-guard.sh /path/to/your/app
| `docs/COMPETITIVE-GAP-ANALYSIS.md` | A survey of the other open source compliance repositories, what each publishes and why, the gaps they surfaced, and what was folded in here |
| `docs/OPEN-SOURCE-PATTERNS.md` | What the community already codified. The fastlane precheck metadata rule set, the Android Play Policy Insights and security lints, community rejection repositories, and the Google Play pre-launch report, folded in |
| `docs/OTHER-STORES.md` | Huawei AppGallery, the Chinese stores, Samsung, Amazon, Microsoft, and RuStore, plus the cross store patterns worth adopting |
+| `docs/GAMBLING-MATRIX.md` | Per country loot box and real money gambling rules, for games that ship worldwide |
| `docs/MISTAKE-PATTERNS.md` | The eight root cause patterns, the top mistakes, and the appeal playbook |
| `docs/PRE-SUBMISSION-CHECKLIST.md` | Exhaustive pre submission checklists for both stores, every item a verifiable check |
| `data/rejection-patterns.json` | Machine readable taxonomy of rejection patterns with detection signals and fixes. Drives the guard |
diff --git a/docs/BY-APP-TYPE.md b/docs/BY-APP-TYPE.md
index c6e54e4..96220bc 100644
--- a/docs/BY-APP-TYPE.md
+++ b/docs/BY-APP-TYPE.md
@@ -54,6 +54,7 @@ A games app and a finance app fail review for very different reasons. This doc r
- Real money gaming is licensed, geo restricted, free to download, with official rules. Apple 5.3.
- Simulated gambling and social casino is a separate category with its own rating.
- Accurate age rating for the content and any chance mechanics.
+- For the per country loot box and gambling rules, see docs/GAMBLING-MATRIX.md.
## macOS and the Mac App Store
diff --git a/docs/GAMBLING-MATRIX.md b/docs/GAMBLING-MATRIX.md
new file mode 100644
index 0000000..da50aab
--- /dev/null
+++ b/docs/GAMBLING-MATRIX.md
@@ -0,0 +1,41 @@
+# Loot Box and Gambling Matrix by Country
+
+Random reward mechanics and real money gaming are regulated very differently per country, and a game that ships worldwide has to satisfy the strictest market it is sold in. This matrix captures the well documented positions per jurisdiction. Regulation in this area moves fast, so confirm the current law for any market before you rely on a row.
+
+Two rules sit above the whole matrix.
+
+- Apple 3.1.1 and Google both require odds disclosure for any random reward, in every market. That is the baseline regardless of country.
+- Real money gambling must be licensed, geo restricted to licensed regions, and free to download.
+
+## Loot box and paid random reward positions
+
+| Country or region | Position on paid loot boxes | What you must do |
+|---|---|---|
+| Belgium | Paid random items have been treated as gambling and effectively prohibited since the 2018 Gaming Commission ruling | Remove paid loot boxes for Belgium, or geo restrict |
+| Netherlands | Enforcement action since 2018, with later court rulings, tradeable random items the most exposed | Avoid tradeable paid random items, follow the current Kansspelautoriteit position |
+| China | Probability disclosure is mandatory under the MIIT rules, plus minor spending limits and real name and play time controls | Disclose exact drop rates in app, enforce minor protections |
+| South Korea | A probability disclosure law amending the Game Industry Promotion Act requires odds disclosure, with enforcement from 2025 | Disclose probabilities clearly, keep them accurate |
+| Japan | Complete gacha, kompu gacha, has been banned since 2012, and odds disclosure is handled through industry self regulation | No complete gacha mechanics, disclose odds per the industry codes |
+| United Kingdom | Loot boxes are not classified as gambling at present but are under active scrutiny, with industry self regulation and age controls | Follow the current industry guidance, do not sell paid random items to children |
+| Australia | Reforms require a mandatory minimum age rating for games with paid random items, and classification changes apply | Apply the required age rating, disclose odds |
+| Germany | The Interstate Treaty on Gambling and youth protection rules apply, with age rating through the USK | Age rate appropriately, follow youth protection |
+| United States | No single federal loot box law, but the FTC has scrutinized the practice and store odds disclosure rules apply | Disclose odds per the store rules, watch state level proposals |
+
+## Real money gambling and adjacent categories
+
+| Category | Treatment | What you must do |
+|---|---|---|
+| Real money casino and betting | Licensed and geo restricted per country, free to download | Hold the license per region, restrict to licensed regions, free download |
+| Social casino and simulated gambling | A distinct category from real money, with its own age rating, allowed more widely but still rated | Rate it correctly, no real money payout |
+| Sweepstakes and dual currency sweeps coins | Frequently treated as gambling depending on the prize and consideration | Get legal review per market, geo restrict where it counts as gambling |
+| Cash prize skill tournaments and daily fantasy | Often regulated as gambling or as a regulated contest per state or country | License or restrict per jurisdiction |
+
+## How to use this
+
+1. List the markets the game ships in.
+2. For each market, apply the strictest row that matches the mechanic.
+3. Disclose odds everywhere, because that is the store baseline in every market.
+4. Geo restrict any market where the mechanic is prohibited or unlicensed.
+5. Get a legal review for real money, sweepstakes, and cash prize formats. This matrix is a starting map, not legal advice.
+
+Sources. National gaming regulators and the store gambling policies. Confirm the current position with the regulator for any market before you ship, because this area changes often.
diff --git a/references/guidelines/by-app-type/games.md b/references/guidelines/by-app-type/games.md
index 4f847ed..393cccb 100644
--- a/references/guidelines/by-app-type/games.md
+++ b/references/guidelines/by-app-type/games.md
@@ -5,3 +5,4 @@
- Real money gaming is licensed, geo restricted, free to download, with official rules. Apple 5.3.
- Simulated gambling and social casino is a separate category with its own rating.
- Accurate age rating for the content and any chance mechanics.
+- For the per country loot box and gambling rules, see docs/GAMBLING-MATRIX.md.
diff --git a/scripts/pull-metadata.sh b/scripts/pull-metadata.sh
index 3b16eaa..cdcc8a1 100755
--- a/scripts/pull-metadata.sh
+++ b/scripts/pull-metadata.sh
@@ -1,11 +1,15 @@
#!/usr/bin/env bash
# Pull live store metadata into ./metadata so metadata-audit.py can inspect the
-# real listing, not only the source. Apple uses the asc CLI. Google Play has no
-# one line CLI pull, so this prints the API path to use.
+# real listing, not only the source.
#
-# Apple usage:
+# Apple (asc CLI):
# APP_ID=123456789 VERSION=1.2.0 bash pull-metadata.sh apple
-# needs: brew install asc, and asc auth set up with your App Store Connect API key
+#
+# Google Play (Play Developer API, real pull):
+# PACKAGE_NAME=com.example.app bash pull-metadata.sh google
+# Auth: set GOOGLE_ACCESS_TOKEN, or have gcloud authenticated (the script will
+# call gcloud auth print-access-token). The service account or user must have
+# the Play Developer API enabled and access to the app.
#
# Then audit:
# python3 scripts/metadata-audit.py ./metadata
@@ -27,11 +31,45 @@ case "$target" in
asc metadata pull --app "$APP_ID" --version "$VERSION" --dir "$DIR"
echo "Done. Now run: python3 scripts/metadata-audit.py $DIR"
;;
+
google|play)
- echo "Google Play has no single CLI pull. Two options."
- echo "1. Export the store listing fields from the Play Console and drop them as .txt files in $DIR (name.txt, short_description.txt, full_description.txt) plus a meta.json with privacy_policy_url."
- echo "2. Use the Google Play Developer API edits.listings.get endpoint to fetch the listing, then write the fields into $DIR."
- echo "Then run: python3 scripts/metadata-audit.py $DIR"
+ : "${PACKAGE_NAME:?set PACKAGE_NAME to your app package, e.g. com.example.app}"
+ command -v curl >/dev/null 2>&1 || { echo "curl is required"; exit 1; }
+ command -v python3 >/dev/null 2>&1 || { echo "python3 is required"; exit 1; }
+ TOKEN="${GOOGLE_ACCESS_TOKEN:-}"
+ if [ -z "$TOKEN" ]; then
+ if command -v gcloud >/dev/null 2>&1; then
+ TOKEN="$(gcloud auth print-access-token 2>/dev/null)"
+ fi
+ fi
+ if [ -z "$TOKEN" ]; then
+ echo "No access token. Set GOOGLE_ACCESS_TOKEN or authenticate gcloud."
+ echo "The token needs the androidpublisher scope and access to $PACKAGE_NAME."
+ exit 1
+ fi
+ BASE="https://androidpublisher.googleapis.com/androidpublisher/v3/applications/$PACKAGE_NAME"
+ mkdir -p "$DIR"
+ echo "Creating a Play edit for $PACKAGE_NAME"
+ EDIT="$(curl -fsS -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Length: 0" "$BASE/edits" | python3 -c 'import json,sys;print(json.load(sys.stdin).get("id",""))')"
+ if [ -z "$EDIT" ]; then echo "Failed to create edit. Check token and package access."; exit 1; fi
+ echo "Edit $EDIT. Fetching listings."
+ LISTINGS="$(curl -fsS -H "Authorization: Bearer $TOKEN" "$BASE/edits/$EDIT/listings")"
+ echo "$LISTINGS" | python3 - "$DIR" <<'PYIN'
+import json, os, sys
+dir = sys.argv[1]
+data = json.load(sys.stdin)
+for l in data.get("listings", []):
+ lang = l.get("language", "default")
+ d = os.path.join(dir, lang); os.makedirs(d, exist_ok=True)
+ if l.get("title"): open(os.path.join(d,"name.txt"),"w").write(l["title"])
+ if l.get("shortDescription"): open(os.path.join(d,"short_description.txt"),"w").write(l["shortDescription"])
+ if l.get("fullDescription"): open(os.path.join(d,"full_description.txt"),"w").write(l["fullDescription"])
+ print("wrote", lang)
+PYIN
+ echo "Deleting the edit (read only pull, nothing committed)."
+ curl -fsS -X DELETE -H "Authorization: Bearer $TOKEN" "$BASE/edits/$EDIT" >/dev/null || true
+ echo "Note. The Play privacy policy URL and Data Safety form are not in the listings API. Add the privacy policy URL to $DIR/meta.json as {\"privacy_policy_url\":\"...\"} and verify Data Safety in the Play Console."
+ echo "Done. Now run: python3 scripts/metadata-audit.py $DIR"
;;
*)
echo "Usage: pull-metadata.sh [apple|google]"