diff options
| author | Fuwn <[email protected]> | 2025-02-13 02:44:02 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-13 02:44:02 -0800 |
| commit | 2e22626a5b994182a5c4990d042de1c3f73e47b3 (patch) | |
| tree | c7bc556b04d9092197ff366c3d1b9624dbccf62f /Tonbo/TonboApp.swift | |
| download | tonbo-main.tar.xz tonbo-main.zip | |
Diffstat (limited to 'Tonbo/TonboApp.swift')
| -rw-r--r-- | Tonbo/TonboApp.swift | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tonbo/TonboApp.swift b/Tonbo/TonboApp.swift new file mode 100644 index 0000000..b9ed870 --- /dev/null +++ b/Tonbo/TonboApp.swift @@ -0,0 +1,23 @@ +import SwiftData +import SwiftUI + +@main +struct TonboApp: 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 { + ContentView() + } + .modelContainer(sharedModelContainer) + } +} |