| 1234567891011121314151617181920212223242526272829303132 |
- //
- // TodosApp.swift
- // Todos
- //
- // Created by Sam Jaffe on 2/28/26.
- //
- import SwiftUI
- import SwiftData
- @main
- struct TodosApp: App {
- var sharedModelContainer: ModelContainer = {
- let schema = Schema([
- Category.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)
- }
- }
|