summaryrefslogtreecommitdiff
path: root/ShedCalc/ShedCalcApp.swift
blob: 4a5c6ffc97f9318aea4d4212ff8a28773043c49d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
//  ShedCalcApp.swift
//  ShedCalc
//
//  Created by Jacky Jack on 28/07/2026.
//

import SwiftUI
import SwiftData

@main
struct ShedCalcApp: 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)
    }
}