Learn how to use Realm with SwiftUI as a data persistence solution by building a potion shopping list app.
This is a companion discussion topic for the original entry at https://www.kodeco.com/32960966-realm-with-swiftui-tutorial-getting-started
Learn how to use Realm with SwiftUI as a data persistence solution by building a potion shopping list app.
Thank you for an amazing tutorial!!
You can view your database visually using Realm Studio. To do this, you need to specify the path to your realm, select this path in the console, and click “Show in Finder” Then simply open the realm.
Here’s example:
import SwiftUI
@main
struct LearnAndTestApp: App {
var body: some Scene {
WindowGroup {
let _ = UserDefaults.standard.set(false, forKey: "_UIConstaintBasedLayoutLogUnsatisfiable")
let _ = print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.path)
ContentView()
}
}
}
Swift 5
XCode 16
Realm 5fcba64