# App Store and Google Play

Prepare the App Store and Google Play listing as files in the repository's
`store/` folder, and check them with `spaceboy store check`. The check is
local: nothing is sent to Apple or Google. A person submits in App Store
Connect and Play Console using these files.

```bash
spaceboy store init                  # writes a store/ skeleton (never overwrites)
spaceboy store check --json          # exit 0 when valid, 1 with every problem
```

## The store/ folder

```
store/app.json                       {"version": "1.2.0"}
store/ios/app.json                   app-level answers (below)
store/ios/review.json                App Review contact, demo account, notes
store/ios/<locale>/name.txt          2-30 characters
store/ios/<locale>/subtitle.txt      optional, up to 30
store/ios/<locale>/description.txt   up to 4000
store/ios/<locale>/keywords.txt      up to 100 bytes, comma-separated, each longer than 2 characters
store/ios/<locale>/promotional_text.txt   optional, up to 170
store/ios/<locale>/release_notes.txt      "What's New", up to 4000 (needed from the second version)
store/ios/<locale>/support_url.txt        required
store/ios/<locale>/marketing_url.txt      optional
store/ios/<locale>/privacy_url.txt        required
store/ios/<locale>/screenshots/iphone-6.9/*.png|jpg   required: 1320x2868, 1290x2796 or 1260x2736 (or landscape)
store/ios/<locale>/screenshots/ipad-13/*.png|jpg      required (the starter runs on iPad): 2064x2752 or 2048x2732
store/ios/<locale>/screenshots/iphone-6.5/, iphone-6.1/  optional
store/android/app.json               defaultLanguage, contactEmail, track, rolloutFraction
store/android/<locale>/title.txt              up to 30
store/android/<locale>/short_description.txt  up to 80
store/android/<locale>/full_description.txt   up to 4000
store/android/<locale>/release_notes.txt      optional, up to 500
store/android/<locale>/images/phone/*.png|jpg  2-8, each side 320-3840 px, 16:9 or 9:16, up to 8 MB
store/android/<locale>/images/feature_graphic.png  1024x500, no transparency
store/android/<locale>/images/icon.png             512x512
```

Each iOS screenshot set holds 1 to 10 images without transparency. Locale
folders use store locale codes (`en-US`, `de-DE`, `ja`).

`store/ios/app.json`:

```json
{
  "primaryLocale": "en-US",
  "primaryCategory": "PRODUCTIVITY",
  "copyright": "2026 Example Inc.",
  "contentRightsDeclaration": "DOES_NOT_USE_THIRD_PARTY_CONTENT",
  "usesNonExemptEncryption": false,
  "ageRating": { "violenceCartoonOrFantasy": "NONE" }
}
```

- `usesNonExemptEncryption`: `false` when the app only uses HTTPS and the
  system's own encryption (true of the starter). `true` means a person
  must provide export compliance documents in App Store Connect.
- `contentRightsDeclaration`: `USES_THIRD_PARTY_CONTENT` when the app
  shows or accesses content it does not own.
- `ageRating`: the answers to Apple's age rating questionnaire, as App
  Store Connect API `ageRatingDeclarations` attributes. Apple validates the
  values when the version is submitted.

`store/ios/review.json`:

```json
{
  "contactFirstName": "Ada",
  "contactLastName": "Lovelace",
  "contactPhone": "+1 555 0100",
  "contactEmail": "review@example.com",
  "demoAccountRequired": true,
  "demoAccountName": "review@example.com",
  "demoAccountPasswordSecret": "STORE_REVIEW_PASSWORD",
  "notes": "Sign in with the demo account to see the main screens."
}
```

The demo password is never in the repository: store it with
`spaceboy secrets set STORE_REVIEW_PASSWORD --project prj_...` and name the
secret here. A `password` field is an error.

`store/android/app.json`:

```json
{ "defaultLanguage": "en-US", "contactEmail": "hello@example.com", "track": "internal" }
```

`track` is `internal`, `alpha`, `beta` or `production` (default
`internal`); `rolloutFraction` (above 0, at most 1) stages a production
rollout.

## What store check reports

`--json` prints `{ok, version, platforms, issues, manualSteps}`; on
failure (exit 1) the same object is in `error.details`. Each issue has
`severity` (`error` blocks, `warning` does not), `platform`, `path` (from
the repository root), `code` (for example `TEXT_TOO_LONG`,
`SCREENSHOT_SIZE`, `SCREENSHOTS_MISSING`, `EXPORT_COMPLIANCE_MISSING`,
`PASSWORD_IN_REPOSITORY`) and a `message` that states the rule.

`manualSteps` lists what only a person can do, with where. Give it to your
person as it is. It is:

**App Store** (App Store Connect, appstoreconnect.apple.com):

1. Create the app record: Apps → + → New App, with the app's bundle
   identifier. Apple's API cannot create apps.
2. Answer App Privacy (the privacy "nutrition label"): your app → App
   Privacy. Not available in Apple's API.
3. Accept the current agreements (Business; Account Holder only). Paid apps
   and in-app purchases also need the Paid Apps Agreement, tax forms and a
   bank account.
4. Set price and availability on the first release.

**Google Play** (Play Console, play.google.com/console):

1. Create the app: Home → Create app. Google's API works only with
   existing apps.
2. Upload the first app bundle by hand and accept Play App Signing (Test
   and release → Internal testing).
3. Invite the publishing service account under Users and permissions.
4. Complete App content: privacy policy, app access (sign-in
   instructions for reviewers), ads, content rating questionnaire, target
   audience, Data safety.
5. Personal developer accounts created after 13 November 2023: run a closed
   test with at least 12 testers for 14 days, then apply for production.

The developer program fees are your person's: Apple $99 a year, Google $25
once.

## Not available

- Submitting from the CLI: a person uploads the listing, screenshots and
  review details, attaches a build and submits for review.
- Production builds for the stores: builds point at the development
  environment's API, and Android builds are APKs, while Google Play needs
  app bundles (`.aab`).
