Skip to content

Configuration

LaunchSwift centralizes runtime configuration in AppConfig:

  • ios/SwiftLaunch/Core/Config/AppConfig.swift

AppConfig exposes:

  • deploymentPath (appleNative or fullStack)
  • buildEnvironment (development or production)
  • apiBaseURL
  • cloudKitContainerIdentifier
  • productIDs (monthly, annual, lifetime)

Factory/runtime entry points:

  • AppConfig.development(for:)
  • AppConfig.production(for:)
  • AppConfig.runtime(...)
  • AppConfig.current

Deployment path resolution for AppConfig.current is:

  1. E2ETestOverrides().deploymentPathOverride
  2. SWIFTLAUNCH_DEPLOYMENT_PATH environment variable
  3. UserDefaults key deploymentPath
  4. Info.plist key SWIFTLAUNCH_DEPLOYMENT_PATH
  5. fallback: .appleNative

apiBaseURL is set in:

  • AppConfig.development(for:)http://localhost:8787
  • AppConfig.production(for:)https://api.swiftlaunch.app

APIClient reads AppConfig.current.apiBaseURL for JSON and SSE requests.

To point production to your deployed Worker, update the apiBaseURL value inside production(for:).

Store product IDs are configured in:

  • ProductIDs (monthly, annual, lifetime) in AppConfig.swift
  • PaymentsConfig.Products in ios/SwiftLaunch/Features/Payments/PaymentsConfig.swift

SubscriptionTier (monthly, yearly, lifetime) maps to those IDs in PaymentModels.swift.

There is no AppConfig.telemetryDeckAppID property.

TelemetryDeck integration is defined in:

  • ios/SwiftLaunch/Core/Analytics/AnalyticsService.swift
  • ios/SwiftLaunch/Core/Analytics/AnalyticsEvent.swift

TelemetryDeckAnalyticsService takes appID at initialization time.

In backend/, set secrets using Wrangler:

Terminal window
wrangler secret put BETTER_AUTH_SECRET
wrangler secret put OPENAI_API_KEY
wrangler secret put ANTHROPIC_API_KEY
wrangler secret put GEMINI_API_KEY