diff options
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) + } +} |