> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.ttr.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployment

> Deploying Zeus Flutter to app stores

## Overview

Deploy Zeus Flutter to iOS App Store and Google Play Store.

## Prerequisites

* Apple Developer Account (iOS)
* Google Play Developer Account (Android)
* Production backend deployed
* App icons and screenshots

## iOS Deployment

### 1. Configure Signing

In Xcode:

1. Open `ios/Runner.xcworkspace`
2. Select Runner target
3. Go to Signing & Capabilities
4. Select your team
5. Update bundle identifier (e.g., `com.yourcompany.zeus`)

### 2. Build Archive

```bash theme={null}
# Clean build
flutter clean

# Get dependencies
flutter pub get

# Build for production
flutter build ios --release --flavor production

# Open in Xcode and archive
cd ios
open Runner.xcworkspace
```

### 3. Upload to App Store

In Xcode:

1. Product → Archive
2. Distribute App
3. App Store Connect
4. Upload

### 4. App Store Connect

1. Create new app in App Store Connect
2. Fill in metadata (name, description, screenshots)
3. Submit for review

## Android Deployment

### 1. Configure Signing

Create `android/key.properties`:

```properties theme={null}
storePassword=<password>
keyPassword=<password>
keyAlias=zeus
storeFile=<path-to-keystore>
```

### 2. Build App Bundle

```bash theme={null}
# Clean build
flutter clean

# Get dependencies
flutter pub get

# Build app bundle
flutter build appbundle --release --flavor production
```

### 3. Upload to Play Console

1. Go to Google Play Console
2. Create new app
3. Upload AAB (`build/app/outputs/bundle/productionRelease/app-production-release.aab`)
4. Fill in store listing
5. Submit for review

## CI/CD

### GitHub Actions

```yaml theme={null}
# .github/workflows/deploy.yml
name: Deploy

on:
  push:
    tags:
      - 'v*'

jobs:
  deploy-android:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - uses: subosito/flutter-action@v2
        with:
          flutter-version: '3.10.0'
      
      - name: Build
        run: flutter build appbundle --release --flavor production
      
      - name: Deploy to Play Store
        uses: r0adkll/upload-google-play@v1
        with:
          serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_JSON }}
          packageName: com.yourcompany.zeus
          releaseFiles: build/app/outputs/bundle/productionRelease/*.aab
          track: production
```

## Environment Configuration

### Production API URL

In `lib/config.dart`:

```dart theme={null}
class Config {
  static const String apiUrl = String.fromEnvironment(
    'API_URL',
    defaultValue: 'https://api.zeus.finance',
  );
}
```

### Build Flavors

Use flavors for different environments:

```bash theme={null}
# Development
flutter run --flavor development

# Staging
flutter run --flavor staging

# Production
flutter run --flavor production
```

## Pre-Launch Checklist

* [ ] Test on real devices
* [ ] Verify offline functionality
* [ ] Check sync works correctly
* [ ] Review app performance
* [ ] Add analytics (optional)
* [ ] Configure crash reporting
* [ ] Test on different screen sizes
* [ ] Verify accessibility
* [ ] Add privacy policy
* [ ] Prepare store screenshots
* [ ] Write app description
* [ ] Set pricing and availability

## Post-Launch

1. Monitor crash reports
2. Track sync success rates
3. Respond to user feedback
4. Plan regular updates
