Documentation Index
Fetch the complete documentation index at: https://docs.swiftaiboilerplate.com/llms.txt
Use this file to discover all available pages before exploring further.
This guide gets you running fast. For a full production setup with real backends, follow the step-by-step instructions in the setup guides.
1. Prerequisites
Ensure you have:- ✅ macOS 15+
- ✅ Xcode 26.2+ (iOS 26 SDK, Swift 6.0)
- ✅ 10 minutes
v2.0 ships with iOS 26 Liquid Glass. Runtime still supports iOS 17+ thanks to a Material fallback in
SAIGlass, but the build requires Xcode 26.2+. Stuck on older Xcode? Pin the v1.9.0 tag.2. Clone and Open
Xcode will automatically resolve Swift Package dependencies. Wait ~30 seconds for this to complete.
3. Run Immediately (No Configuration Needed!)
Press ⌘ + R in Xcode - that’s it!To use real services (Supabase, OpenRouter, RevenueCat), see the Production Setup Guide.
4. Explore the App
What You’ll See
Success! If you can send chat messages, you have a working AI app foundation.
5. Explore Features
Try These Flows
Chat UI Styles:- Tap the style switcher icon (top-right in chat)
- Switch between bubble style (WhatsApp) and centered style (ChatGPT)
- Tap profile icon → edit display name
- Try uploading a photo (iOS 17+ PhotosPicker)
- Check subscription status
- Open Settings tab
- Try different themes (5 included: System, Light, Dark, Aurora, Obsidian)
- Toggle preferences
- Create multiple conversations
- Rename conversations (long press)
- Delete conversations (swipe left)
- Search conversations
Verify Everything Works
✅ Authentication
✅ Authentication
- Sign in with any email/password (mock mode)
- Sign out and sign back in
- Profile persists across restarts
✅ Chat
✅ Chat
- Create conversation
- Send messages
- Receive echo responses
- Switch UI styles
- Rename/delete conversations
✅ Profile
✅ Profile
- Edit display name
- Upload photo (compresses automatically)
- View subscription status
✅ Settings
✅ Settings
- Change themes (instant update)
- Toggle preferences
- All settings persist
What’s Running in Mock Mode
The app automatically detects missing backend configuration and uses mocks:| Component | Mock Behavior | Production |
|---|---|---|
| Auth | MockAuthClient - any credentials work | SupabaseAuthClient |
| AI | EchoLLMClient - echoes messages | ProxyLLMClient → OpenRouter |
| Payments | MockPaymentsClient - simulated states | RevenueCatClient |
| Storage | Local SwiftData | Local + optional cloud sync |
Mock mode is perfect for:
- Learning the codebase
- UI development
- Testing without API costs
- Demo purposes
Next Steps
- Customize Immediately
- Understand Architecture
- Setup Production Backends
Jump straight to customization:Change branding (5 minutes):
- App name: Edit
Config/App.xcconfig - Colors: Edit
DesignSystemColors.xcassets - Icon: Replace in
Assets.xcassets/AppIcon.appiconset
Run Tests
Verify everything with the test suite:Troubleshooting
Cannot find 'Glass' in scope on older Xcode
Cannot find 'Glass' in scope on older Xcode
Cause: Liquid Glass APIs (
Glass, glassEffect, GlassEffectContainer) are iOS 26 SDK symbols. Older toolchains cannot compile them, even behind #available checks.Solution: Upgrade to Xcode 26.2+ (the repo pins 26.3 via .xcode-version), or stay on the v1.9.0 tag until you can upgrade.Tab bar doesn't minimise on scroll
Tab bar doesn't minimise on scroll
.tabBarMinimizeBehavior(.onScrollDown) is iOS 26 only. On iOS 17–25 the saiTabBarMinimize(_:) modifier is a no-op and returns the same view. No action needed; behaviour is progressive.Dark blobs under my sheets / sheets look opaque
Dark blobs under my sheets / sheets look opaque
Cause: You (or downstream code) applied
DSColors.background.ignoresSafeArea() or .background(.black) under the container. These block the Material SwiftUI already provides and fight Liquid Glass on iOS 26.Solution: Remove the manual background. SwiftUI handles sheet materials for you on iOS 26. See the Migration Guide section “Fighting glass cleanup”.`any` keyword required everywhere
`any` keyword required everywhere
Swift 6 enforces explicit
any on protocol-typed stored properties and parameters. The boilerplate has been audited for this already; your own types may need updates. See the Migration Guide.MainActor-isolated error on ModelContext
MainActor-isolated error on ModelContext
Cause:
MessageRepositoryImpl, ConversationRepositoryImpl, and SettingsRepositoryImpl are now @MainActor-pinned in v2.0.Solution: Create repositories from the main thread, or await when constructing them from a background context.App won't build
App won't build
Solution:
Debug sign-in not appearing
Debug sign-in not appearing
Cause: Running in Release modeSolution:
- Product → Scheme → Edit Scheme
- Run → Build Configuration → Debug
- Clean and rebuild
Dependencies won't resolve
Dependencies won't resolve
Solution:
Quick Reference
File Locations
Key Files for Customization
| What to Change | File Location |
|---|---|
| App name | Config/App.xcconfig |
| Colors | Resources/DesignSystemColors.xcassets/ |
| Onboarding | AppShell/OnboardingPage.swift |
| Home screen | AppShell/HomeContent.swift |
Useful Commands
What You’ve Learned
You now have:
- ✅ A running AI chat app
- ✅ Working authentication (mock mode)
- ✅ Functional chat with dual UIs
- ✅ Profile management
- ✅ Crashlytics setup
- ✅ Theme system (5 themes)
- ✅ Understanding of mock vs production
Ready to Build?
Customize
Change branding, features, and UI
Architecture
Learn the system design
Deploy
Ship to production
