# VOTD — Ship Checklist

Every TestFlight build follows these three commands, in this order, from the `apps/mobile` directory.

---

## Three commands before every archive

```bash
cd ~/votd/apps/mobile
./bump-build.sh
git push origin main
```

That's it. Then open Xcode and archive.

---

## What each command does

**`./bump-build.sh`**
Increments `buildNumber` in both `app.json` and `ios/votd.xcodeproj/project.pbxproj`. Commits the change automatically. Both files must be in sync or Xcode will use the stale value from `project.pbxproj` at archive time.

**`git push origin main`**
Pushes the bumped build number and all pending commits to the remote. Keeps the branch clean and ensures the TestFlight build matches what's in source control.

**Then archive in Xcode**
`Product → Archive → Distribute App → TestFlight Internal Only`

---

## When icons have changed

Run this before the three commands above:

```bash
cd ~/votd/apps/mobile
bash scripts/stamp-icon-profile.sh
```

This stamps both the phone and watch icons with the correct color profile and clears the Expo image cache. Then continue with the standard three commands.

---

## When native dependencies have changed

If `package.json` has new native packages (anything that ends up in `ios/Podfile`), run a prebuild first:

```bash
cd ~/votd/apps/mobile
npx expo prebuild --platform ios
```

Then the standard three commands, then archive.

---

## Quick reference

| Situation | Commands |
|---|---|
| Normal build | `bump-build.sh` → `git push` → archive |
| Icons updated | `stamp-icon-profile.sh` → `bump-build.sh` → `git push` → archive |
| New native package | `expo prebuild` → `bump-build.sh` → `git push` → archive |

---

## Notes

- Never skip `bump-build.sh` — TestFlight rejects builds with duplicate build numbers.
- The script auto-increments by 1. To set a specific number: `./bump-build.sh 42`
- Build numbers do not need to be sequential — skipping is fine (e.g. 27 → 30 if 28/29 were bad builds).
- After a bad build, skip the number rather than reusing it. TestFlight retains all uploaded builds.
