# AirWave - Internet Radio for macOS

## TestFlight Submission Checklist

### ✅ Code Quality & Stability
- [x] Error handling implemented for network failures
- [x] Loading states for stream buffering
- [x] User-friendly error messages
- [x] Comprehensive logging for debugging
- [x] Input validation (station names, URLs, categories)
- [x] Duplicate prevention
- [x] Safe data persistence with atomic writes
- [x] Memory leak prevention (weak self, observer cleanup)

### ✅ Privacy & Security
- [x] Privacy manifest (PrivacyInfo.xcprivacy) added
- [x] No tracking or analytics
- [x] No personal data collection
- [x] File protection enabled for saved data
- [x] UserDefaults only for app settings (CA92.1)
- [x] File timestamps only for data loading (C617.1)

### ⚠️ Required Before TestFlight Submission

#### 1. **App Icon**
- [ ] Create app icon set (1024x1024 minimum)
- [ ] Add to Assets.xcassets
- [ ] Ensure all required sizes are included

#### 2. **Build Configuration**
- [ ] Set proper Bundle Identifier (e.g., nl.yourcompany.airwave)
- [ ] Set Version number (e.g., 1.0.0)
- [ ] Set Build number (e.g., 1)
- [ ] Enable Hardened Runtime
- [ ] Enable App Sandbox
- [ ] Configure Code Signing

#### 3. **Entitlements Required**
```xml
- com.apple.security.app-sandbox = YES
- com.apple.security.network.client = YES (for streaming)
- com.apple.security.files.user-selected.read-write = YES (optional, for export)
```

#### 4. **App Store Information**
Prepare the following for App Store Connect:

**App Description (Dutch):**
```
AirWave is een eenvoudige en elegante internetradio-app voor macOS. 

Functies:
• Toegang tot honderden radiostations wereldwijd
• Menubar-integratie voor snelle bediening
• Organiseer stations in categorieën
• Voeg eigen stations toe via stream URL
• AirPlay ondersteuning
• Media key ondersteuning (play/pause)
• Automatische standby handling
• Audio output device selectie

Perfect voor wie van eenvoud houdt en snel naar hun favoriete stations wil luisteren.
```

**Keywords:**
```
radio, internet radio, streaming, muziek, music, nieuws, podcast
```

**Privacy Policy:**
```
AirWave verzamelt geen persoonlijke gegevens en gebruikt geen tracking. 
Alle instellingen worden lokaal op je apparaat opgeslagen.
De app maakt alleen verbinding met de radiostreams die je selecteert.
```

#### 5. **Screenshots Required**
- [ ] 1280x800 (13" MacBook)
- [ ] 1440x900 (recommended)
- [ ] 2560x1600 (Retina displays)

Take screenshots showing:
1. Main menu with station list
2. Settings window
3. Now playing state
4. Station management

#### 6. **Testing Checklist**
- [ ] Test fresh install (delete app data first)
- [ ] Test adding custom stations
- [ ] Test station categories
- [ ] Test drag & drop
- [ ] Test search functionality
- [ ] Test media keys
- [ ] Test AirPlay (if available)
- [ ] Test standby/wake behavior
- [ ] Test error scenarios (bad URL, no internet)
- [ ] Test app restart (state persistence)
- [ ] Test with different audio devices

#### 7. **Xcode Project Settings**

In Xcode, verify:

**General Tab:**
- Bundle Identifier: `nl.yourcompany.airwave`
- Version: `1.0.0`
- Build: `1`
- Minimum macOS: `14.0` (or your target)
- Category: `Music`

**Signing & Capabilities:**
- Team: Select your Apple Developer team
- Signing Certificate: Apple Distribution
- Enable "App Sandbox"
- Enable "Hardened Runtime"

**Build Settings:**
- Code Signing Identity: Apple Distribution
- Development Team: Your team
- Marketing Version: 1.0.0
- Current Project Version: 1

#### 8. **Archive & Upload**

```bash
# 1. Clean build folder
Product → Clean Build Folder (Cmd+Shift+K)

# 2. Archive
Product → Archive

# 3. In Organizer
- Select archive
- Click "Distribute App"
- Choose "TestFlight & App Store"
- Upload to App Store Connect

# 4. In App Store Connect
- Go to TestFlight tab
- Add testers
- Submit for Beta Review (if required)
```

### Known Issues / Future Improvements

- [ ] Add volume persistence
- [ ] Add recent stations list
- [ ] Add favorites/bookmarks
- [ ] Add streaming quality info
- [ ] Add timer/sleep functionality
- [ ] Add keyboard shortcuts for stations
- [ ] Add mini player window option

### Support & Feedback

For beta testers, provide:
- Email: support@yourcompany.nl
- Feedback form or issue tracker

### Notes

**Minimum System Requirements:**
- macOS 14.0 or later
- Internet connection for streaming

**File Locations:**
- App Support: `~/Library/Application Support/AirWave/`
- Stations data: `stations.json`
- Settings: UserDefaults

**Network Usage:**
- Only connects to selected radio streams
- No analytics or tracking servers
- Stream bandwidth varies by station (typically 64-320 kbps)
