From de5ee043826bce23906bfcb351a2702e1aa88270 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Mon, 27 Nov 2023 12:39:11 -0800 Subject: Getting started --- Hotline/HotlineApp.swift | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Hotline/HotlineApp.swift (limited to 'Hotline/HotlineApp.swift') 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) + } +} -- cgit