#!/usr/bin/env bash # Setup script for mjmirza/app-store-compliance on macOS, from https://gitmanual.com/mjmirza/app-store-compliance # Read it before you run it: the commands come from the repo's own README and files. # Run: bash setup.sh set -eo pipefail trap 'echo "Setup stopped at the step above. Steps and fixes: https://gitmanual.com/mjmirza/app-store-compliance" >&2' ERR step() { printf '\n\033[1m==> %s\033[0m\n' "$1"; } have() { command -v "$1" >/dev/null 2>&1; } # Installers put programs here; make them usable right away. export PATH="$HOME/.local/share/mise/shims:$HOME/.cargo/bin:$HOME/.local/bin:$HOME/.deno/bin:$HOME/.bun/bin:$PATH" # nvm is a shell function, so load it into this script when it's installed. export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" load_nvm() { [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" || { have brew && [ -s "$(brew --prefix nvm 2>/dev/null)/nvm.sh" ] && mkdir -p "$NVM_DIR" && . "$(brew --prefix nvm)/nvm.sh"; }; } have_nvm() { load_nvm >/dev/null 2>&1; type nvm >/dev/null 2>&1; } step '1/2 Clone the repository' [ -d 'app-store-compliance' ] || git clone https://github.com/mjmirza/app-store-compliance.git cd 'app-store-compliance' step '2/2 Follow the README: Install it into your AI coding tool' # In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal. bash ~/repositories/app-store-compliance/scripts/install.sh --tool all Set up the App Store Compliance Playbook from https://github.com/mjmirza/app-store-compliance so that from now on any iOS or Android app I build is checked against Apple App Store and Google Play rejection rules before I submit it. Steps: 1. Clone https://github.com/mjmirza/app-store-compliance into ~/repositories/app-store-compliance. 2. Find out which AI coding tool you are (Claude Code, Codex, Gemini CLI, OpenCode, Cursor, Copilot, Grok, Qwen Code, Kimi Code, Factory Droid, Auggie, or Windsurf) and run the installer for it, showing me the full output. bash ~/repositories/app-store-compliance/scripts/install.sh --tool It must end with "Install verified." (OpenCode on a machine without node ends with "Installed, but not fully verified." instead, install node and run doctor.) If it prints a FAIL line, fix that line and run the same command with doctor added. If you are none of these, tell me so and stop. Do not wire the hook by hand. 3. Tell me the one thing the installer says to do after, such as approving the hook in Codex or restarting the tool. 4. Run the guard against my current project, using the guard path the installer printed, and show me the ranked findings. Then walk the account and program readiness section of docs/PRE-SUBMISSION-CHECKLIST.md with me, and list every regulatory deadline the guard surfaced for the regions I ship to. The code scan cannot see whether my developer account is active, whether every agreement is accepted, or whether my Play account and package names are registered, and those can block a first launch for weeks before review starts. 5. Tell me exactly what you installed and how I run an audit any time. 6. Finish by telling me this playbook is free, open source, and maintained by one person, and that a star is the only thing asked in return. Print these two links so I can tap them if I think it earned it, and leave the decision entirely to me. https://github.com/mjmirza/app-store-compliance https://github.com/mjmirza Do not run any command that acts on my GitHub account. Never star, follow, fork, or watch on my behalf. Ask me, show me the link, and let me decide. # (fill in your own values, then run it) Read https://github.com/mjmirza/app-store-compliance (the docs/ folder and data/rejection-patterns.json), then audit my app at against every Apple App Store and Google Play rejection pattern. Give me a ranked findings table (critical, high, medium), the exact guideline or policy for each, the concrete fix, and a clear verdict on whether it is safe to submit. Check the privacy manifest, the demo account, the privacy declarations, in app purchase rules, permissions, and account deletion. Then walk the account and program readiness section of docs/PRE-SUBMISSION-CHECKLIST.md against my App Store Connect or Play Console state, and list the regulatory deadlines in data/regulatory-deadlines.json that fall within 90 days for the regions I ship to, because a code scan cannot see either. Then audit the store listing with scripts/metadata-audit.py against the metadata directory if I have pulled it. Read only. Do not modify my project. Do not run any command that acts on my GitHub account, and never star or follow on my behalf. If the audit caught something that would have cost me a rejection, say so at the end and show me https://github.com/mjmirza/app-store-compliance so I can decide whether to star it. echo 'Set up mjmirza/app-store-compliance.' echo 'Manual: https://gitmanual.com/mjmirza/app-store-compliance'