<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/DocumentPreviewSession/updateContents(url:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial Preview"
    ],
    "preciseIdentifier" : "s:14SpatialPreview08DocumentB7SessionC14updateContents3urly10Foundation3URLV_tYaKF"
  },
  "title" : "updateContents(url:)"
}
-->

# updateContents(url:)

Update the contents of the document with the provided URL.

```
final nonisolated(nonsending) func updateContents(url: URL) async throws
```

## Parameters

`url`

A file URL pointing to the new document contents.

---

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)