Still there:
import SwiftData
@main
struct ForeCashApp: App {
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Transaction.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 {
NavigationStack {
TransactionsScreen()
}
}
.modelContainer(sharedModelContainer)
}
}
Post
Replies
Boosts
Views
Activity
swift:22: Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer)