<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSData/WritingOptions/completeFileProtectionUntilFirstUserAuthentication",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSDataWritingOptions@NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication"
  },
  "title" : "completeFileProtectionUntilFirstUserAuthentication"
}
-->

# completeFileProtectionUntilFirstUserAuthentication

An option to allow the file to be accessible after a user first unlocks the device.

```
static var completeFileProtectionUntilFirstUserAuthentication: NSData.WritingOptions { get }
```

## Discussion

In this case, the app can read or write to the file while the device is unlocked, but while it’s booting up, the file has the protection equivalent to [`completeFileProtection`](/documentation/Foundation/NSData/WritingOptions/completeFileProtection).

---

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)