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

# autosavesInPlace

A Boolean value that indicates whether the document subclass supports autosaving in place.

```
nonisolated class var autosavesInPlace: Bool { get }
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver supports autosaving in place; <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

The default implementation of this method returns <doc://com.apple.documentation/documentation/Swift/false>. You can override it and return <doc://com.apple.documentation/documentation/Swift/true> to declare that your subclass of `NSDocument` can do autosaving in place. You should not invoke this method to find out whether autosaving in place is actually being done at any particular moment. You should instead use the [`NSDocument.SaveOperationType`](/documentation/AppKit/NSDocument/SaveOperationType) parameter that the system passes to your overrides of save and write methods.

AppKit invokes this method at a variety of times, and not always on the main thread. For example, [`autosave(withImplicitCancellability:completionHandler:)`](/documentation/AppKit/NSDocument/autosave(withImplicitCancellability:completionHandler:)) invokes this method as part of determining whether the autosaving will be performed in place ([`NSDocument.SaveOperationType.autosaveInPlaceOperation`](/documentation/AppKit/NSDocument/SaveOperationType/autosaveInPlaceOperation)) or in a separate autosave directory ([`NSDocument.SaveOperationType.autosaveElsewhereOperation`](/documentation/AppKit/NSDocument/SaveOperationType/autosaveElsewhereOperation)). As another example, the [`canClose(withDelegate:shouldClose:contextInfo:)`](/documentation/AppKit/NSDocument/canClose(withDelegate:shouldClose:contextInfo:)) method and the [`NSDocumentController`](/documentation/AppKit/NSDocumentController) machinery for handling unsaved changes at app termination time both invoke this method as part of determining whether alerts about unsaved changes should be presented to the user.

---

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)