<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSPersistentStoreFileProtectionKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:@NSPersistentStoreFileProtectionKey"
  },
  "title" : "NSPersistentStoreFileProtectionKey"
}
-->

# NSPersistentStoreFileProtectionKey

Key to represent the protection class for the persistent store.

```
let NSPersistentStoreFileProtectionKey: String
```

## Discussion

Backward compatibility may preclude some features. The acceptable values are those defined for the <doc://com.apple.documentation/documentation/Foundation/FileAttributeKey/protectionKey>. The default value is <doc://com.apple.documentation/documentation/Foundation/FileProtectionType/completeUntilFirstUserAuthentication> for all applications built on or after iOS v5.0. The default value for all older applications is <doc://com.apple.documentation/documentation/Foundation/FileProtectionType/none>.

---

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)