Find complete step-by-step guide in your project: supabase.md
What You’ll Set Up
Authentication
Email/password and Apple Sign In authentication
AI Proxy
Secure Edge Function for OpenRouter API calls
Prerequisites
- Supabase account (free tier available)
- OpenRouter account (pay-as-you-go)
- Supabase CLI installed:
Step-by-Step Setup
1
Step 1: Open Project Settings
Go to Supabase dashboard and navigate to Project Settings.This is where you’ll find all the credentials needed to connect your Swift app.
2
Step 2: Find Your API Keys
Find the API Keys tab on the left menu, then copy your anon-public key.
This is a public key that’s safe to include in your iOS app bundle.
3
Step 3: Copy Your Project ID
Write down your project ID. The easiest way is usually copying it from the address bar of your browser.
4
Step 4: Add to Secrets.xcconfig
Open
Config/Secrets.xcconfig in Xcode and add your credentials:5
Step 5: Login to Supabase CLI
Open Terminal, navigate to your repo, and login to Supabase:Follow the instructions (press Enter to open browser and login).
6
Step 6: Link Your Project
Link your project to your repo:
7
Step 7: Create Generated Directory
Create the generated directory for your configuration file:
Replace
YourApp with your actual project folder name (e.g., Capishi).8
Step 8: Run Update Config Script
Run the update config script to generate your Swift configuration file:This generates a new Swift file including your public keys. It is safe to have this in the bundle.
9
Step 9: Disable Email Confirmation (Development)
For ease of development, temporarily disable the Confirm email option from Supabase:
- Go to Authentication → Settings
- Disable Enable email confirmations
What You Get
After setup:- ✅ Real email/password authentication
- ✅ Sign in with Apple working
- ✅ Secure session management with auto-refresh
- ✅ Production-ready backend
Continue Setup
After completing Supabase setup, continue with:Related Guides
Chat Sync
Optional: Sync conversations across devices
Profile Photos
Optional: Cloud photo storage
Building Your App
Complete customization guide
Authentication Module
Technical documentation
Troubleshooting
Authentication not working
Authentication not working
- Verify SUPABASE_URL and SUPABASE_ANON_KEY are correct
- Run
bash scripts/update-config.shagain - Clean and rebuild in Xcode (⌘⇧K then ⌘B)
Configuration.swift not generated
Configuration.swift not generated
- Make sure you created the Generated directory
- Check the path matches your project structure
- Run the update-config script from the project root
CLI login fails
CLI login fails
- Make sure you have Supabase CLI installed
- Try
supabase logoutthensupabase loginagain - Check your internet connection
Need Help?
- 📖 Check the troubleshooting section above
- 💬 Create an issue
- 🔍 Search Supabase docs
