Created
November 19, 2023 21:09
-
-
Save colinfwren/4ced63965524cea7e801a729866722c4 to your computer and use it in GitHub Desktop.
date test app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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