<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSFileVersion/persistentIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileVersion(py)persistentIdentifier"
  },
  "title" : "persistentIdentifier"
}
-->

# persistentIdentifier

The identifier for this version of the file.

```
var persistentIdentifier: any NSCoding { get }
```

## Discussion

You can save the value of this property persistently and use it to recreate the version object later. When recreating the version object using the [`version(itemAt:forPersistentIdentifier:)`](/documentation/Foundation/NSFileVersion/version(itemAt:forPersistentIdentifier:)) method, the version object returned is equivalent to the current object.

---

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)