Skip to content

Glossary: SwiftUI

ModelContainer

Also written: .modelContainer(for:)

The SwiftData database itself: it knows which model classes to store and where the file lives. You create one for the app with `.modelContainer(for:)` on the WindowGroup.

Where the book teaches it

Related terms

ModelContext@Query@Model