<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocument/hasUnautosavedChanges",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocument(py)hasUnautosavedChanges"
  },
  "title" : "hasUnautosavedChanges"
}
-->

# hasUnautosavedChanges

A Boolean value that indicates whether the document has changes that have not been autosaved.

```
var hasUnautosavedChanges: Bool { get }
```

## Discussion

The value of this property is <doc://com.apple.documentation/documentation/Swift/true> if the document has changes that have not been autosaved; otherwise, the value is <doc://com.apple.documentation/documentation/Swift/false>. A document has unsaved changes when the [`updateChangeCount(_:)`](/documentation/AppKit/NSDocument/updateChangeCount(_:)) method has been called since the last save.

---

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)