Skip to content

Instantly share code, notes, and snippets.

@colinfwren
Created November 19, 2023 21:09
Show Gist options
  • Save colinfwren/4ced63965524cea7e801a729866722c4 to your computer and use it in GitHub Desktop.
Save colinfwren/4ced63965524cea7e801a729866722c4 to your computer and use it in GitHub Desktop.
date test app
import SwiftUI
import SwiftData
@main
struct SwiftDataTestApp: App {
let container: ModelContainer
var body: some Scene {
WindowGroup {
ApproachContentView(modelContext: container.mainContext)
}
.modelContainer(container)
}
init() {
do {
container = try ModelContainer(for: ApproachModel.self)
} catch {
fatalError("Failed to create ModelContainer for Approach.")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment