Realm With SwiftUI Tutorial: Getting Started | Kodeco, the new raywenderlich.com

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

Thank you for an amazing tutorial!!

1 Like

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