# Veritas News - App Store Assets

This directory contains all assets and metadata required for submitting the
Veritas News app to the iOS App Store and Google Play Store.

## Directory Structure

```
store/
├── ios/
│   ├── metadata.json      # App Store Connect metadata
│   ├── screenshots.json   # Screenshot specifications
│   └── screenshots/       # Actual screenshot images (not in git)
│       ├── iPhone6.7/
│       ├── iPhone6.5/
│       ├── iPhone5.5/
│       └── iPad12.9-gen2/
├── android/
│   ├── metadata.json      # Google Play Console metadata
│   ├── screenshots.json   # Screenshot specifications
│   └── screenshots/       # Actual screenshot images (not in git)
│       ├── phone/
│       ├── tablet7/
│       ├── tablet10/
│       └── foldable/
└── README.md              # This file
```

## iOS App Store

### Metadata (`ios/metadata.json`)

Contains all App Store Connect metadata including:

- App name and subtitle
- Full description (localized)
- Keywords for search
- Age ratings
- Review information
- Privacy policy URLs

### Screenshots (`ios/screenshots.json`)

Defines screenshot requirements for all device sizes:

- **iPhone 6.7"**: iPhone 15 Pro Max, iPhone 15 Plus (1290x2796)
- **iPhone 6.5"**: iPhone 14 Plus, iPhone 13 Pro Max (1242x2688)
- **iPhone 5.5"**: iPhone 8 Plus, iPhone 7 Plus (1242x2208)
- **iPad Pro 12.9"**: All iPad Pro 12.9" models (2048x2732)

### App Preview Videos

Optional promotional videos (15-30 seconds) showing key features.

## Google Play Store

### Metadata (`android/metadata.json`)

Contains all Google Play Console metadata including:

- Title and descriptions
- Content rating details
- Data safety information
- Target countries
- Pricing and in-app purchases

### Screenshots (`android/screenshots.json`)

Defines screenshot requirements:

- **Phone**: Standard smartphones (1080x1920)
- **7" Tablet**: Small tablets (1200x1920)
- **10" Tablet**: Large tablets (1920x1200)
- **Foldable**: Samsung Galaxy Fold/Flip (1768x2208)

### Feature Graphic

Required promotional image (1024x500) displayed at the top of the store listing.

## Generating Screenshots

Screenshots can be generated automatically using Maestro or Detox:

```bash
# Using Maestro (recommended)
maestro test .maestro/screenshots.yaml

# Using Detox
detox test -c ios.screenshots
detox test -c android.screenshots
```

### Screenshot Guidelines

1. **Resolution**: Match exact device specifications
2. **Content**: Show real app content, not mockups
3. **Text**: Avoid overlaid text (use captions in the console)
4. **Borders**: No rounded corners or device bezels (stores add these)
5. **Status bar**: Show a clean status bar (9:41 AM, full battery, full signal)

## Submission Scripts

Submission is automated via EAS (Expo Application Services):

```bash
# Submit to both stores
./scripts/submit-all.sh

# iOS only
./scripts/submit-ios.sh

# Android only
./scripts/submit-android.sh

# Build only (don't submit)
./scripts/submit-all.sh --build-only

# Submit latest build
./scripts/submit-all.sh --submit-only
```

### Required Environment Variables

#### iOS

```bash
export EXPO_APPLE_ID="your-apple-id@email.com"
export EXPO_ASC_APP_ID="123456789"  # App Store Connect numeric ID
export EXPO_APPLE_TEAM_ID="ABC123DEF"
export APP_STORE_DEMO_PASSWORD="demo-password"  # For app review
```

#### Android

```bash
export GOOGLE_SERVICE_ACCOUNT_KEY_PATH="/path/to/service-account.json"
```

## Release Checklist

### Before Each Release

- [ ] Update version in `app.json`
- [ ] Update `whatsNew` / `recentChanges` in metadata
- [ ] Generate new screenshots if UI changed
- [ ] Test on physical devices
- [ ] Review privacy policy if data collection changed

### iOS Specific

- [ ] Update `buildNumber` in `app.json`
- [ ] Test on latest iOS version
- [ ] Test on iPad if tablet-optimized
- [ ] Verify all entitlements are correct

### Android Specific

- [ ] Update `versionCode` in `app.json`
- [ ] Test on foldable devices (if supported)
- [ ] Verify all permissions are declared
- [ ] Complete data safety form if changed

## Localization

Currently supported localizations:

- `en-US` (primary)
- `en-GB`

To add a new language:

1. Add localization block in both metadata.json files
2. Generate localized screenshots
3. Update supported territories

## Resources

- [App Store Connect](https://appstoreconnect.apple.com)
- [Google Play Console](https://play.google.com/console)
- [App Store Review Guidelines](https://developer.apple.com/app-store/review/guidelines/)
- [Google Play Policy Center](https://play.google.com/console/about/guides/)
- [EAS Submit Documentation](https://docs.expo.dev/submit/introduction/)
