You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
supabase-swift v3 public alpha adds typed database queries and one API shape across every module. Nothing changes until you upgrade. Check the changes the compiler misses.
supabase-swift v3 is the next major version of the Supabase client library for Swift. You can try it today as 3.0.0-alpha.1 through Swift Package Manager. Alpha means the public API can still change between prereleases. Your feedback shapes the 3.0.0 release: share it on GitHub.
What you get
Typed database queries. supabase gen types --lang swift writes an @Table struct for every table in your schema. Query with supabase.from(Books.self), and a misspelled or renamed column is a compile error, not a runtime failure. Postgres functions get typed RPC methods. The typed API is experimental: import it with @_spi(Experimental) import Supabase. from("books") keeps working, so you can move one table at a time.
One API across every module. Auth, Database, Storage, Functions, and Realtime share one configuration shape, one error shape, and one naming style. Each module error carries a typed code and the original error in underlyingError.
Built for Swift 6. Every API is async and Sendable, streams are AsyncSequences, and you can call the SDK from @MainActor code without warnings.
Features users asked for. Storage reports upload and download progress and supports resumable uploads. Edge Functions can stream a response. Realtime reconnects with backoff when the network or the app comes back. Auth has an @ObservableAuthModel for SwiftUI on iOS 17 and later, and one OAuth entry point.
Why v3 breaks v2 code
v2 grew one module at a time, and many of its shapes came from supabase-js: string headers, callback-based APIs, and a different configuration and error type in each module. A major version is the only moment these shapes can change, so v3 changes all of them at once. You upgrade once instead of absorbing a series of smaller breaks.
Who is affected
Every project on supabase-swift v2 that upgrades to v3.
Projects that build with an Xcode version older than 26. v3 requires Xcode 26 and Swift 6.2.
Projects that use a third-party package built on supabase-swift v2. You can upgrade once that package releases a v3-compatible version.
What happens if you take no action
Nothing changes. A from: "2.0.0" requirement never resolves 3.0.0, and Swift Package Manager never picks a prerelease unless you ask for one. v2 keeps receiving security and critical fixes for 6 months after the 3.0.0 release. New features only land in v3.
Changes the compiler will not catch
Most of the upgrade shows up as compile errors. Some changes do not, for example:
A URLError or DecodingError now arrives wrapped in the module error.
A cancelled task throws CancellationError, also where v2 threw URLError(.cancelled).
Debug builds log warnings and errors by default.
Your custom middleware and transport run once per retry attempt.
Check the full "Silent changes" list in the migration guide and in each module guide before you ship.
Migration steps
Install Xcode 26 or later.
Change the package requirement to .package(url: "https://github.com/supabase/supabase-swift", from: "3.0.0-alpha.1").
Build, then fix the compile errors with the migration guide. Start with the changes in every module and SupabaseClient, then go module by module. Most errors are renames.
Read every "Silent changes" list and search your code for each item.
Optionally, generate your types with supabase gen types --lang swift and move your queries from from("table") to from(Table.self).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
supabase-swift v3 public alpha adds typed database queries and one API shape across every module. Nothing changes until you upgrade. Check the changes the compiler misses.
supabase-swift v3 is the next major version of the Supabase client library for Swift. You can try it today as
3.0.0-alpha.1through Swift Package Manager. Alpha means the public API can still change between prereleases. Your feedback shapes the 3.0.0 release: share it on GitHub.What you get
supabase gen types --lang swiftwrites an@Tablestruct for every table in your schema. Query withsupabase.from(Books.self), and a misspelled or renamed column is a compile error, not a runtime failure. Postgres functions get typed RPC methods. The typed API is experimental: import it with@_spi(Experimental) import Supabase.from("books")keeps working, so you can move one table at a time.codeand the original error inunderlyingError.asyncandSendable, streams areAsyncSequences, and you can call the SDK from@MainActorcode without warnings.@ObservableAuthModelfor SwiftUI on iOS 17 and later, and one OAuth entry point.Why v3 breaks v2 code
v2 grew one module at a time, and many of its shapes came from
supabase-js: string headers, callback-based APIs, and a different configuration and error type in each module. A major version is the only moment these shapes can change, so v3 changes all of them at once. You upgrade once instead of absorbing a series of smaller breaks.Who is affected
What happens if you take no action
Nothing changes. A
from: "2.0.0"requirement never resolves 3.0.0, and Swift Package Manager never picks a prerelease unless you ask for one. v2 keeps receiving security and critical fixes for 6 months after the 3.0.0 release. New features only land in v3.Changes the compiler will not catch
Most of the upgrade shows up as compile errors. Some changes do not, for example:
URLErrororDecodingErrornow arrives wrapped in the module error.CancellationError, also where v2 threwURLError(.cancelled).Check the full "Silent changes" list in the migration guide and in each module guide before you ship.
Migration steps
.package(url: "https://github.com/supabase/supabase-swift", from: "3.0.0-alpha.1").SupabaseClient, then go module by module. Most errors are renames.supabase gen types --lang swiftand move your queries fromfrom("table")tofrom(Table.self).Rollout timeline
3.0.0-alpha.1Questions or problems with the upgrade? File v3 feedback on supabase-swift or contact Supabase support.
Affected products: supabase-swift
Authored by @grdsdev
All reactions