Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(swift): remove usage of deprecated code from getting started guide (#28639)

Guilherme Souzac73dd369adc8
diff --git a/apps/docs/content/guides/getting-started/tutorials/with-swift.mdx b/apps/docs/content/guides/getting-started/tutorials/with-swift.mdx
index 7a71bc87124..33e597d1210 100644
--- a/apps/docs/content/guides/getting-started/tutorials/with-swift.mdx
+++ b/apps/docs/content/guides/getting-started/tutorials/with-swift.mdx
@@ -128,6 +128,8 @@ After a user is signed in, you can allow them to edit their profile details and
Create a new view for that called `ProfileView.swift`.
```swift ProfileView.swift
+import SwiftUI
+
struct ProfileView: View {
@State var username = ""
@State var fullName = ""
@@ -180,7 +182,7 @@ struct ProfileView: View {
do {
let currentUser = try await supabase.auth.session.user
- let profile: Profile = try await supabase.database
+ let profile: Profile = try await supabase
.from("profiles")
.select()
.eq("id", value: currentUser.id)
@@ -204,7 +206,7 @@ struct ProfileView: View {
do {
let currentUser = try await supabase.auth.session.user
- try await supabase.database
+ try await supabase
.from("profiles")
.update(
UpdateProfileParams(
@@ -260,6 +262,8 @@ Now that you've created all the views, add an entry point for the application. T
Add a new `AppView.swift` file.
```swift AppView.swift
+import SwiftUI
+
struct AppView: View {
@State var isAuthenticated = false