Supabase + The Swift Kit — Auth, Database & Storage Pre-Wired
Email auth, Sign in with Apple, Postgres with Row Level Security, Storage buckets. Paste your Supabase URL and anon key, and ship.
The Swift Kit ships Supabase end-to-end: email/password + magic link + Sign in with Apple auth flows, an @Observable session model that drives the entire app\'s auth state, a starter Postgres schema with Row Level Security policies, and Storage bucket helpers for image uploads. Paste your Supabase URL and anon key into Secrets.swift, run the included SQL migration once, and a complete authenticated iOS app compiles and runs.
What's Pre-Wired
The Swift Kit ships these Supabase capabilities ready to use:
- SupabaseClient configured at app launch from Secrets.swift
- @Observable AuthModel binds to Supabase session changes
- Email + password sign-up / sign-in / magic-link flows
- Sign in with Apple → Supabase Auth integration
- Sign out, password reset, account deletion flows
- Starter Postgres schema (profiles table) with RLS policies
- Storage helpers for image uploads (avatars, attachments)
- Offline cache layer via SwiftData
- Error handling + user-facing messages
Setup in 5 Minutes
After cloning Swift Kit:
enum Secrets {
static let supabaseURL = "https://xxxxx.supabase.co"
static let supabaseAnonKey = "eyJhbGc..." // anon public key
// ...rest of your keys
}Reading Auth State Anywhere
AuthModel is in the environment — any view can react to session changes:
struct RootView: View {
@Environment(AuthModel.self) var auth
var body: some View {
if auth.isSignedIn {
MainTabView()
} else {
SignInView()
}
}
}Database Queries with RLS
Row Level Security means the database itself enforces "you can only see your own data." No server middleware needed.
// RLS policy on the database:
// CREATE POLICY "Users see own tasks" ON tasks
// FOR SELECT USING (auth.uid() = user_id);
// In iOS code — no user_id filter needed; RLS handles it:
let tasks: [Task] = try await supabase
.from("tasks")
.select()
.order("created_at", ascending: false)
.execute()
.valueSkip the backend setup.
Auth, database, storage — all pre-wired to Supabase in The Swift Kit.
Frequently Asked Questions
How is Supabase integrated in The Swift Kit?
Do I need to write SQL or set up RLS policies myself?
Does Sign in with Apple work out of the box?
Can I use this with my own existing Supabase project?
What about offline / cached data?
Is Supabase a real Firebase alternative?
Keep exploring
Ship your iOS app 10× faster
The Swift Kit gives you a production-ready SwiftUI boilerplate — design system, paywall, auth, AI, all pre-wired. $99 one-time.
Get The Swift Kit — $99One-time purchase · Lifetime updates · 14-day refund