<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSData/WritingOptions/completeFileProtectionWhenUserInactive",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSDataWritingOptions@NSDataWritingFileProtectionCompleteWhenUserInactive"
  },
  "title" : "completeFileProtectionWhenUserInactive"
}
-->

# completeFileProtectionWhenUserInactive

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

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

## Discussion

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 `NSDataWritingFileProtectionComplete`.

---

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)