# Publish to iOS (App Store)

## Prerequisites

- Paid [Apple Developer](https://developer.apple.com) account
- App created in [App Store Connect](https://appstoreconnect.apple.com) with the same **Bundle ID** as your project
- Mac with Xcode and Flutter installed

## One-time setup

```bash
kasy ios configure
```

Opens Apple links, collects the API key (`.p8`), and writes `.kasy/apple.env` (gitignored).

## Signing in Xcode (required once)

Kasy removes the `DEVELOPMENT_TEAM` from the template so you can use your own Apple account.

1. Open `ios/Runner.xcworkspace` in Xcode.
2. Target **Runner** → **Signing & Capabilities** → check **Automatically manage signing** and pick your **Team**.

Verify with `kasy doctor` (Release iOS section).

## Ship a new build

```bash
kasy ios release
```

Bumps the build number in `pubspec.yaml`, builds the IPA, and uploads it straight to App Store Connect — no need to open Transporter. If you'd rather upload manually, use the **Transporter** app with the `.ipa` from `build/ios/ipa/`.

Shortcut: `make release-ios`

### Options

- `kasy ios build` — IPA only, no upload
- `kasy ios release --no-bump` — skip build number bump
- `kasy ios release --version-name 1.0.1` — change marketing version

## No Mac?

Use cloud builds: [codemagic-release.md](./codemagic-release.md) and `kasy codemagic configure` / `kasy codemagic release`.

## Check environment

```bash
kasy doctor
```
