---
title: Snapshot
framework: swiftui
role: symbol
role_heading: Associated Type
path: swiftui/referencefiledocument/snapshot
---

# Snapshot

A type that represents the document’s stored content.

## Declaration

```swift
associatedtype Snapshot
```

## Discussion

Discussion Define this type to represent all the data that your document stores. When someone issues a Save command, SwiftUI asks your document for a value of this type by calling the document’s snapshot(contentType:) method. SwiftUI sends the snapshot that you provide to the document’s fileWrapper(snapshot:configuration:) method, where you serialize the contents of the snapshot into a file wrapper.

## See Also

### Getting a snapshot

- [snapshot(contentType:)](swiftui/referencefiledocument/snapshot(contenttype:).md)
