┌─────────────────┐ │ 1. Archive │ │ Xcode → Product│ ├─────────────────┤ │ 2. Upload │ │ → App Store │ ├─────────────────┤ │ 3. Process │ │ ASC processing │ ├─────────────────┤ │ 4. TestFlight │ │ → Beta test │ └─────────────────┘

TestFlight

Archive, upload, and distribute beta builds.

✈ TestFlight ═══════════ Archive → IPA Upload → ASC Process → Test
Developer Docs Archon iOS · Swift · SwiftUI API v1

TestFlight

Archive, upload, and distribute beta builds.

Prerequisites

Apple Developer Account
Active Apple Developer Program membership ($99/year). Required for code signing and App Store Connect access.
Code Signing
A distribution certificate and provisioning profile configured in Xcode. Use automatic signing for simplicity.
App Store Connect
The app must have a record in App Store Connect with at least one version created.

Step 1: Archive

# Via Xcode
1. Select "Any iOS Device" as the build destination
2. Product → Archive
3. Wait for the archive to complete

# Via command line
xcodebuild archive \
  -project Archon.xcodeproj \
  -scheme Archon \
  -archivePath build/Archon.xcarchive \
  -destination "generic/platform=iOS"

Step 2: Upload to App Store Connect

# Via Xcode ( Organizer )
1. Window → Organizer
2. Select the archive
3. "Distribute App" → "App Store Connect"
4. Follow the upload wizard

# Via command line (xcodebuild + altool)
xcodebuild -exportArchive \
  -archivePath build/Archon.xcarchive \
  -exportOptionsPlist ExportOptions.plist \
  -exportPath build/output

xcrun altool --upload-app \
  -f build/output/Archon.ipa \
  -t ios \
  -u your-apple-id \
  -p your-app-specific-password

Step 3: App Store Connect Processing

After upload, Apple processes the build (typically 10-30 minutes). During processing:

Binary Analysis
Apple scans for private API usage, entitlement issues, and architecture compatibility.
Screenshot Generation
If you've configured automatic screenshot generation, Apple captures device frames.
Processing Complete
You'll receive an email notification when the build is ready for TestFlight distribution.

Step 4: TestFlight Distribution

Internal Testing
Add the build to an Internal Group for up to 100 team members. No App Store review required. Builds are available immediately after processing.
External Testing
Create an External Group and invite beta testers via email or public link. Requires App Review for first submissions.
TestFlight Link
Generate a public link for open beta testing. Testers install via the TestFlight app on their device.

Pre-Release Checklist

☐ Version number updated
Check MARKETING_VERSION in the xcconfig or target settings.
☐ Build number incremented
CURRENT_PROJECT_VERSION must be higher than the previous upload.
☐ All tests pass
Run the full test suite before archiving. Cmd + U in Xcode.
☐ Release config selected
Ensure you're archiving with the Release configuration, not Debug.
☐ Supabase production URL
Verify the xcconfig points to the production Supabase project, not staging.
☐ No debug logging
Ensure print() and debug-only code is wrapped in #if DEBUG blocks.
☐ Privacy manifest
Verify PrivacyInfo.xcprivacy is up to date with required reason APIs.

Verification Steps

After uploading to TestFlight, verify the build before wider distribution:

1. Install from TestFlight
Install on a clean device or simulator. Don't restore from a backup — test the fresh install experience.
2. Test Authentication
Sign in with email, Apple Sign In, and test sign out. Verify session persistence across app launches.
3. Test Core Flow
Create a project, send a chat message, verify task progress, browse code, and test live preview.
4. Test Error States
Airplane mode → verify offline handling. Invalid credentials → verify error messages. Low credits → verify credit warning.
5. Performance Check
Launch time <2 seconds. Smooth scrolling in project list. No memory warnings in Instruments.

TestFlight Build Expiry

TestFlight builds expire after 90 days. Apple removes expired builds automatically. If you need longer beta testing, submit through App Store review for an unlisted build.