---
title: completeFileProtectionWhenUserInactive
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsdata/writingoptions/completefileprotectionwhenuserinactive
---

# completeFileProtectionWhenUserInactive

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

## Declaration

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

## Discussion

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.

## See Also

### Constants

- [atomic](foundation/nsdata/writingoptions/atomic.md)
- [withoutOverwriting](foundation/nsdata/writingoptions/withoutoverwriting.md)
- [noFileProtection](foundation/nsdata/writingoptions/nofileprotection.md)
- [completeFileProtection](foundation/nsdata/writingoptions/completefileprotection.md)
- [completeFileProtectionUnlessOpen](foundation/nsdata/writingoptions/completefileprotectionunlessopen.md)
- [completeFileProtectionUntilFirstUserAuthentication](foundation/nsdata/writingoptions/completefileprotectionuntilfirstuserauthentication.md)
- [fileProtectionMask](foundation/nsdata/writingoptions/fileprotectionmask.md)
