Skip to main content

Prerequisites

Before starting, ensure you have:
  • macOS 14+ (Sonoma or newer)
  • Xcode 15+ (latest recommended)
  • Git installed
No backend setup required for initial run! The app includes mock backends for immediate development.

Step 1: Clone the Repository

git clone https://github.com/BerkinSi/SwiftAIBoilerplatePro-Distribution.git
cd SwiftAIBoilerplatePro

Step 2: Open in Xcode

open SwiftAIBoilerplatePro.xcodeproj
The project uses Swift Package Manager. Xcode will automatically resolve dependencies on first open (takes ~30 seconds).

Step 3: Configure Environment

Copy the example configuration file:
cp Config/Secrets.example.xcconfig Config/Secrets.xcconfig
For immediate testing, you can leave the default values! The app will use:
  • MockAuthClient (no Supabase needed)
  • EchoLLMClient (echoes messages back)
  • No payment functionality

Step 4: Build and Run

Press ⌘ + R in Xcode or:
xcodebuild -scheme SwiftAIBoilerplatePro \
  -destination 'platform=iOS Simulator,name=iPhone 15'

What You’ll See

On first run, the app will:
  1. Show onboarding - 3 swipeable pages
  2. Display sign-in - Use any email/password (mock auth)
  3. Home screen - Feature cards and quick actions
  4. Chat works! - Send messages, get echo responses
  5. Settings screen - Explore different themes
If you see the home screen, you’re all set! The app is running with mock backends.

Project Structure

SwiftAIBoilerplatePro/
├── SwiftAIBoilerplatePro/        # Main app
│   ├── AppShell/                  # UI screens
│   ├── Composition/               # DI container
│   └── Resources/                 # Assets
├── Packages/                      # 9 Swift Packages
│   ├── Core/                      # Foundation
│   ├── Networking/                # HTTP client
│   ├── Storage/                   # SwiftData
│   ├── Auth/                      # Authentication
│   ├── Payments/                  # Subscriptions
│   ├── AI/                        # LLM client
│   ├── FeatureChat/               # Chat UI
│   ├── FeatureSettings/           # Settings
│   └── DesignSystem/              # UI components
├── Config/                        # Build configuration
│   ├── App.xcconfig
│   └── Secrets.xcconfig           # Your API keys
└── supabase/                      # Backend (optional)
    └── functions/ai/              # AI proxy

Mock vs Production Mode

Mock Mode (Default)

Perfect for:
  • ✅ Rapid initial development
  • ✅ UI testing without setup
  • ✅ Exploring the codebase
  • ✅ Avoiding API or subscription costs
What’s mocked:
  • Authentication (any email works)
  • AI responses (echoed locally)
  • Payments (simulated states)

Production Mode

When you’re ready to go live, switching to Production Mode is seamless. This boilerplate is designed so you can move from mock data to real users and APIs in just a few setup steps, all clearly documented. Required when you need:
  • Real user authentication (via Supabase)
  • Actual AI responses
  • Working subscriptions and payments
To complete the backend setup see Quick Start or Setup Guides.

Verify Installation

1

App Builds

No build errors in Xcode
2

Tests Pass

Run tests with ⌘ + U - all should pass
3

UI Works

Navigate through onboarding → sign in → home → chat

Common Issues

Dependencies Won’t Resolve

Solution:
# In Xcode
File Packages Reset Package Caches
File Packages Update to Latest Package Versions

Missing Config File

Error: Config/Secrets.xcconfig not found Solution:
cp Config/Secrets.example.xcconfig Config/Secrets.xcconfig

Build Errors

Solution:
# Clean build
 + Shift + K

# Or from terminal
xcodebuild clean

Next Steps

Development Tips

Using AI assistants? Check out CLAUDE.md for guidelines on AI-assisted development.
Want to customize immediately? Read the Building Your App guide which includes ready-to-use LLM prompts for common tasks.
I