# Setup script for mjmirza/app-store-compliance on Windows (PowerShell), 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: powershell -ExecutionPolicy Bypass -File .\setup.ps1 $ErrorActionPreference = "Stop" function Write-Step($t) { Write-Host "`n==> $t" -ForegroundColor Cyan } # Windows ships a python that only opens the Microsoft Store; it doesn't count. function Have($c) { $cmd = Get-Command $c -ErrorAction SilentlyContinue; [bool]$cmd -and $cmd.Source -notlike '*\WindowsApps\*' } # New installs change PATH; pick it up without opening a new window. function Update-Path { $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User") } # Stop when a program fails, like bash's set -e. Dot-sourced, so cd and venv activation carry on to the next step. function Invoke-Step([scriptblock]$Block) { $global:LASTEXITCODE = 0; . $Block; if ($LASTEXITCODE) { throw "Failed with exit code $LASTEXITCODE" } } # winget's "already installed" and "no newer version" (0x8A150061, 0x8A15002B) aren't failures. function Skip-Installed { if ($LASTEXITCODE -in -1978335135, -1978335189) { $global:LASTEXITCODE = 0 } } Write-Step '1/2 Clone the repository' if (-not (Test-Path 'app-store-compliance')) { Invoke-Step { git clone https://github.com/mjmirza/app-store-compliance.git } } Set-Location 'app-store-compliance' Write-Step '2/2 Follow the README: Install it into your AI coding tool' # Run these in Git Bash (installed with Git) or WSL — not PowerShell. Do the README instructions above first. Invoke-Step { bash ~/repositories/app-store-compliance/scripts/install.sh --tool all } Invoke-Step { 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. } Invoke-Step { Steps: } Invoke-Step { 1. Clone https://github.com/mjmirza/app-store-compliance into ~/repositories/app-store-compliance. } Invoke-Step { 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. } Invoke-Step { bash ~/repositories/app-store-compliance/scripts/install.sh --tool } Invoke-Step { 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. } Invoke-Step { If you are none of these, tell me so and stop. Do not wire the hook by hand. } Invoke-Step { 3. Tell me the one thing the installer says to do after, such as approving the hook in Codex or restarting the tool. } Invoke-Step { 4. Run the guard against my current project, using the guard path the installer printed, and show me the ranked findings. } Invoke-Step { Then walk the account and program readiness section of docs/PRE-SUBMISSION-CHECKLIST.md } Invoke-Step { with me, and list every regulatory deadline the guard surfaced for the regions I ship to. } Invoke-Step { The code scan cannot see whether my developer account is active, whether every agreement } Invoke-Step { is accepted, or whether my Play account and package names are registered, and those can } Invoke-Step { block a first launch for weeks before review starts. } Invoke-Step { 5. Tell me exactly what you installed and how I run an audit any time. } Invoke-Step { 6. Finish by telling me this playbook is free, open source, and maintained by one person, } Invoke-Step { and that a star is the only thing asked in return. Print these two links so I can tap } Invoke-Step { them if I think it earned it, and leave the decision entirely to me. } Invoke-Step { https://github.com/mjmirza/app-store-compliance } Invoke-Step { https://github.com/mjmirza } Invoke-Step { Do not run any command that acts on my GitHub account. Never star, follow, fork, or watch } Invoke-Step { 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. Invoke-Step { Read only. Do not modify my project. Do not run any command that acts on my GitHub account, } Invoke-Step { and never star or follow on my behalf. If the audit caught something that would have cost me } Invoke-Step { a rejection, say so at the end and show me https://github.com/mjmirza/app-store-compliance } Invoke-Step { so I can decide whether to star it. } Write-Host 'Set up mjmirza/app-store-compliance.' Write-Host 'Manual: https://gitmanual.com/mjmirza/app-store-compliance'