The signatures for the ModelContainer convenience initializers have changed to take the configuration as a named parameter. This should do the trick:
struct AppleClosetApp: App {
let config = ModelConfiguration(url: AppGroup.facts.containerURL ?? URL(fileURLWithPath: ""))
var body: some Scene {
WindowGroup {
ClosetNavigationView()
.modelContainer(try! ModelContainer(for: Closet.self,
configurations: config))
}
}
}
Topic:
Programming Languages
SubTopic:
Swift
Tags: