Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.
SwiftData Documentation
Search these docs to answer questions about SwiftData APIs.
Return Format
Always include:
- Summary - Answer the question concisely
- File paths - List relevant files for full details, e.g.:
swiftdata-model.mdfor @Model macroswiftdata-query.mdfor @Query usage
Files
swiftdata-index.md- Framework overview and all available APIsswiftdata-model.md- @Model macro and model definitionswiftdata-modelcontext.md- ModelContext for CRUD operationsswiftdata-query.md- @Query property wrapper for fetching data

