<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ReadableDocument/apply(snapshot:previous:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16ReadableDocumentP5apply8snapshot8previousy6Reader_8SnapshotQZn_AISgntYaKF"
  },
  "title" : "apply(snapshot:previous:)"
}
-->

# apply(snapshot:previous:)

Applies a loaded snapshot to the document model.

```
@MainActor func apply(snapshot: sending Self.Reader.Snapshot, previous: sending Self.Reader.Snapshot?) async throws
```

## Parameters

`snapshot`

The content loaded from disk.

`previous`

The previously loaded snapshot, or `nil` on
the first read. Use it to apply incremental updates.

## Discussion

SwiftUI calls this on the main actor after the reader’s
[`read(from:progress:)`](/documentation/SwiftUI/DocumentReader/read(from:progress:)) completes. Update
your model properties here. Keep this method lightweight —
all deserialization should happen in the reader.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)