---
title: preservesVersions
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsdocument/preservesversions
---

# preservesVersions

A Boolean value that indicates whether the document subclass supports version management.

## Declaration

```swift
class var preservesVersions: Bool { get }
```

## Return Value

Return Value true if the receiving subclass of NSDocument supports Versions; otherwise false.

## Discussion

Discussion The default implementation of this method returns [self autosavesInPlace]. You can override it and return false to declare that NSDocument should not preserve old document versions. Returning false from this method disables version browsing and revertToSaved(_:), which rely on version preservation when autosaving in place. Returning true from this method when autosavesInPlace returns false will result in undefined behavior.

## See Also

### Configuring the Autosave Behavior

- [autosavesInPlace](appkit/nsdocument/autosavesinplace.md)
- [autosavesDrafts](appkit/nsdocument/autosavesdrafts.md)
- [autosavedContentsFileURL](appkit/nsdocument/autosavedcontentsfileurl.md)
- [autosavingFileType](appkit/nsdocument/autosavingfiletype.md)
- [autosavingIsImplicitlyCancellable](appkit/nsdocument/autosavingisimplicitlycancellable.md)
