Skip to main content
The full config schema is machine-readable in 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)
This file contains API keys and secrets. Never commit it to git.
Template: Config/Secrets.example.xcconfig (copy this to get started)
Generate Configuration.swift:
This regenerates 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

Get credentials: Supabase Dashboard → Project Settings → API

OpenRouter

Set as Supabase secret:
Get key: OpenRouter Dashboard

RevenueCat

Get key: RevenueCat Dashboard → Settings → API Keys

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:
When 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
Release:
  • Real auth required
  • Production logging
  • Crashlytics opt-in (requires CRASHLYTICS_ENABLED=true and a GoogleService-Info.plist)
  • Full optimization
Switch configuration:

Quick Reference

  1. Edit Scheme → Run → Environment Variables
  2. Set AUTH_BYPASS = 0
  3. Fill in Config/Secrets.xcconfig with real Supabase credentials
  4. Run bash scripts/update-config.sh
  5. Clean and rebuild
  1. Run SQL migration
  2. Set chatSyncEnabled = true in FeatureFlags
  3. Uncomment Supabase repositories
  4. Wire up in CompositionRoot
  1. Update Config/Secrets.xcconfig with production URLs/keys
  2. Run bash scripts/update-config.sh to regenerate Configuration.swift
  3. Verify in RELEASE build configuration
  4. Archive and test

Installation

Initial configuration

Supabase Setup

Backend configuration

Building Guide

Production configuration

Architecture

How config flows through app