# Store checks

Two checks that catch store problems before they cost you a review cycle, or an app removal.

- **`healkite store-check`** scans your project for the usual reasons the App Store or Google Play
  reject a build.
- **`healkite ota-check`**, run automatically by `healkite release`, checks whether an over-the-air
  update stays within what the stores allow.

Both run on your machine or in CI, from rules: no code is uploaded and results are the same every run.
They catch common, well-defined problems; they don't replace reading the review guidelines.

## Before a store build: `healkite store-check`

```sh
npx healkite store-check
```

```
✘ BLOCKER  Missing NSCameraUsageDescription  (App Store · 5.1.1)
   react-native-vision-camera uses the camera. Without a purpose string the app crashes when it asks…
   → Add <key>NSCameraUsageDescription</key><string>…</string> to Info.plist.

▲ HIGH  Third-party login without an equivalent option  (App Store · 4.8)
▲ HIGH  Account creation without account deletion  (Both stores · Apple 5.1.1(v) · Google Play User Data policy)
● MEDIUM  Card payments without in-app purchase  (App Store · 3.1.1)

1 blocker · 2 high · 1 medium · 0 info
```

What it checks:

| Area | Checks |
|---|---|
| iOS purpose strings | Camera, photos, location, contacts, calendars, microphone, Bluetooth, Face ID, tracking, Health, motion: required by the libraries you use, present and not placeholders |
| iOS privacy manifest | `PrivacyInfo.xcprivacy` present, with required-reason API declarations |
| Tracking | Ad/attribution SDKs without App Tracking Transparency |
| Login | Google/Facebook login without Sign in with Apple (or another equivalent option) |
| Payments | Card/web payment SDKs without in-app purchase (digital goods must use IAP) |
| Accounts | Sign-up without account deletion (both stores require it) |
| Background modes | Background location/audio without matching purpose strings or players |
| Android permissions | SMS, call log, all-packages, all-files, background location, install-packages, broad photo/video, exact alarms, overlays, accessibility services |
| Android target SDK | Below Google Play's yearly requirement |
| Misc | Cleartext traffic, AdMob app ID, export-compliance key, code that runs strings |

In CI, fail the job on blockers (default) or stricter:

```sh
npx healkite store-check --fail-on high --json
```

For Expo apps without `ios/` and `android/` folders, the native checks use `app.json`; run it after
`expo prebuild` for the full set.

## Before an OTA update: store rules for over-the-air

Apple allows over-the-air JavaScript that fixes bugs and improves existing features, without changing
the app's purpose or adding features review never saw (guidelines 3.3.1(B) and 2.5.2). And an update
can only use native code that's already in the store build.

`healkite release` compares your code with the release devices run now and gives a verdict:

- **Safe**: JavaScript and assets only, nothing the stores restrict.
- **Review**: for example a new card or web payment flow (3.1.1), code run from strings (2.5.2), or 3+
  new screens in one update, which may count as a new feature.
- **Not for OTA**: native files changed, a dependency with native code added or upgraded, native
  settings in `app.json` changed, a permission requested that the store build doesn't declare, or code
  that behaves differently for app reviewers. `healkite release` stops; pass `--force` if you're sure.

The verdict is saved with the release and shown on its page in the dashboard.

Run it on pull requests too:

```sh
npx healkite ota-check -c production-… -p ios -r 2.4      # vs what devices on 2.4 run now
npx healkite ota-check --base origin/main                  # vs a branch
```
