template.manifest.json (repo root) under configSchema. The keys below are the authoritative source consumed by the app and the scripts/appstore-43-audit.sh gate.
Config Keys
| Key | Type | Required | Secret | Purpose |
|---|---|---|---|---|
SUPABASE_URL | url | Yes | No | Supabase project URL (auth + backend) |
SUPABASE_ANON_KEY | string | Yes | Yes | Supabase anonymous key |
REVENUECAT_API_KEY | string | No | Yes | RevenueCat public SDK key |
RC_ENTITLEMENT_ID | string | No | No | RevenueCat entitlement identifier |
PROXY_BASE_URL | url | No | No | AI proxy base URL; EchoLLMClient is used when empty |
PROXY_PATH | string | No | No | AI proxy path |
ONESIGNAL_APP_ID | string | No | Yes | OneSignal push app ID |
Configuration Files
Config/Secrets.xcconfig
Location:Config/Secrets.xcconfig (gitignored)
Template: Config/Secrets.example.xcconfig (copy this to get started)
SwiftAIBoilerplatePro/Generated/Configuration.swift (the AppConfiguration enum) with your values. Keys whose value still contains a YOUR placeholder are written as a comment and treated as “not configured” at runtime.
Config/App.xcconfig
Location:Config/App.xcconfig
General app-level build settings, including the single source of truth for app identity. Every target’s bundle ID and the app-group entitlements derive from APP_BUNDLE_ID.
Environment Variables
Set in Xcode Scheme → Edit Scheme → Run → Arguments → Environment Variables.| Variable | Reads in | Default behavior | Purpose |
|---|---|---|---|
AUTH_BYPASS | DEBUG only | Mock used unless set to 0 | Set 0 to use the real Supabase auth client (and MockPaymentsClient is also swapped for RevenueCatClient) |
DIAGNOSTICS_ENABLED | RELEASE | false | Set true to enable diagnostics in Release |
CRASHLYTICS_ENABLED | RELEASE | false | Set true to enable Firebase Crashlytics in Release |
CHAT_SYNC_ENABLED | RELEASE | false | Set true to enable Supabase chat history sync in Release |
PROXY_DEFAULT_HEADERS | Any | none | Optional JSON string of extra headers for the AI proxy |
CompositionRoot.swift from AUTH_BYPASS, not in FeatureFlags. In RELEASE the app always uses real auth; the MockAuthClient is DEBUG-only.
Feature Flags
Location:SwiftAIBoilerplatePro/Composition/FeatureFlags.swift
Backend Configuration
Supabase
- Development
- Production
OpenRouter
Set as Supabase secret:RevenueCat
CompositionRoot Configuration
Location:SwiftAIBoilerplatePro/Composition/CompositionRoot.swift
The DI container reads configuration from the generated AppConfiguration enum and chooses real or mock implementations. The LLM client is selected by createLLMClient(...) in LLMClientFactory.swift:
PROXY_BASE_URL is unconfigured the app also wires an UnconfiguredHTTPClient instead of a real URLSessionHTTPClient, so unconfigured backends fail explicitly rather than calling a placeholder host.
Xcode Build Configuration
Debug vs Release
Debug (default):- Mock auth enabled by default
- Detailed logging
- Crashlytics disabled
- No optimization
- Real auth required
- Production logging
- Crashlytics opt-in (requires
CRASHLYTICS_ENABLED=trueand aGoogleService-Info.plist) - Full optimization
Quick Reference
Enable Real Auth in DEBUG
Enable Real Auth in DEBUG
- Edit Scheme → Run → Environment Variables
- Set
AUTH_BYPASS=0 - Fill in
Config/Secrets.xcconfigwith real Supabase credentials - Run
bash scripts/update-config.sh - Clean and rebuild
Enable Chat Sync
Enable Chat Sync
- Run SQL migration
- Set
chatSyncEnabled = truein FeatureFlags - Uncomment Supabase repositories
- Wire up in CompositionRoot
Switch to Production Backend
Switch to Production Backend
- Update
Config/Secrets.xcconfigwith production URLs/keys - Run
bash scripts/update-config.shto regenerate Configuration.swift - Verify in RELEASE build configuration
- Archive and test
Related Resources
Installation
Initial configuration
Supabase Setup
Backend configuration
Building Guide
Production configuration
Architecture
How config flows through app
