Sesame-iOS/Sesame/SesameApp.swift
2023-12-12 17:33:42 +01:00

25 lines
506 B
Swift

import SwiftUI
import SwiftData
@main
struct SesameApp: App {
@State
var modelContainer: ModelContainer
init() {
do {
self.modelContainer = try ModelContainer(for: HistoryItem.self)
} catch {
fatalError("Failed to create model container: \(error)")
}
}
var body: some Scene {
WindowGroup {
ContentView(modelContext: modelContainer.mainContext)
}
.modelContainer(modelContainer)
}
}