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

# autosavesDrafts

A Boolean value that indicates whether the document subclass supports autosaving of drafts.

```
class var autosavesDrafts: Bool { get }
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiving subclass of [`NSDocument`](/documentation/AppKit/NSDocument) supports autosaving of drafts; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The system expects that an [`NSDocument`](/documentation/AppKit/NSDocument) subclass that returns <doc://com.apple.documentation/documentation/Swift/true> from this property can properly handle save operations that use the [`NSDocument.SaveOperationType.autosaveAsOperation`](/documentation/AppKit/NSDocument/SaveOperationType/autosaveAsOperation) save operation type.

The default implementation of this property returns <doc://com.apple.documentation/documentation/Swift/true>. To opt out of autosaving in your [`NSDocument`](/documentation/AppKit/NSDocument) subclass, override this property to return <doc://com.apple.documentation/documentation/Swift/false>.

AppKit invokes this property at various times. For example, when calling the [`updateChangeCount(_:)`](/documentation/AppKit/NSDocument/updateChangeCount(_:)) method with [`NSDocument.ChangeType.changeDone`](/documentation/AppKit/NSDocument/ChangeType/changeDone), but without the [`NSDocument.ChangeType.changeDiscardable`](/documentation/AppKit/NSDocument/ChangeType/changeDiscardable) change type, `NSDocument` uses [`NSDocument.SaveOperationType.autosaveAsOperation`](/documentation/AppKit/NSDocument/SaveOperationType/autosaveAsOperation) on the next autosave. The operation writes the document’s contents to a new file or file package, then changes the document’s current location to point to the new file or file package.

Don’t invoke this property to find out whether autosaving of a draft might occur.

---

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)