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
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.
The mock-vs-real auth decision is made in
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
