Or is this, with the versioned schema plugged in more appropriate:
let modelContainer: ModelContainer = {
do {
let schema = Schema(versionedSchema: AllSwiftDataSchemaV3.self)
return try ModelContainer(
for: schema,
migrationPlan: PlanBriefMigrationPlan.self
)
} catch {
fatalError("ModelContainer failed: \(error.localizedDescription)")
}
}()
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: