Skip to main content
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

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.
https://supabase.com/dashboard/project/YOUR_PROJECT_ID
4

Step 4: Add to Secrets.xcconfig

Open Config/Secrets.xcconfig in Xcode and add your credentials:
SUPABASE_URL = https://YOUR_PROJECT_ID.supabase.co
SUPABASE_ANON_KEY = your-anon-public-key
The Secrets.xcconfig file must be under the Config folder in your project root.
5

Step 5: Login to Supabase CLI

Open Terminal, navigate to your repo, and login to Supabase:
cd ~/path-to-your-repo
supabase login
Follow the instructions (press Enter to open browser and login).
6

Step 6: Link Your Project

Link your project to your repo:
supabase link --project-ref YOUR_PROJECT_ID
7

Step 7: Create Generated Directory

Create the generated directory for your configuration file:
mkdir -p "${PROJECT_ROOT}/YourApp/Generated"
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:
bash scripts/update-config.sh
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:
  1. Go to AuthenticationSettings
  2. Disable Enable email confirmations
Remember to re-enable this before production launch if you want email verification.

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:

Troubleshooting

  • Verify SUPABASE_URL and SUPABASE_ANON_KEY are correct
  • Run bash scripts/update-config.sh again
  • Clean and rebuild in Xcode (⌘⇧K then ⌘B)
  • Make sure you created the Generated directory
  • Check the path matches your project structure
  • Run the update-config script from the project root
  • Make sure you have Supabase CLI installed
  • Try supabase logout then supabase login again
  • Check your internet connection

Need Help?