diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-11-27 12:39:11 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-11-27 12:39:11 -0800 |
| commit | de5ee043826bce23906bfcb351a2702e1aa88270 (patch) | |
| tree | 39c945bf3958d2e295a66596d1bac53ceb4c54d6 /Hotline/HotlineApp.swift | |
Getting started
Diffstat (limited to 'Hotline/HotlineApp.swift')
| -rw-r--r-- | Hotline/HotlineApp.swift | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Hotline/HotlineApp.swift b/Hotline/HotlineApp.swift new file mode 100644 index 0000000..f351e67 --- /dev/null +++ b/Hotline/HotlineApp.swift @@ -0,0 +1,25 @@ +import SwiftUI +import SwiftData + +@main +struct HotlineApp: App { + var sharedModelContainer: ModelContainer = { + let schema = Schema([ + Item.self, + ]) + let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) + + do { + return try ModelContainer(for: schema, configurations: [modelConfiguration]) + } catch { + fatalError("Could not create ModelContainer: \(error)") + } + }() + + var body: some Scene { + WindowGroup { + TrackerView() + } + .modelContainer(sharedModelContainer) + } +} |