---
title: completeWhenUserInactive
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/urlfileprotection/completewhenuserinactive
---

# completeWhenUserInactive

An option that instructs the system to store the file in an encrypted format on-disk that your app can access only after device unlock and before expiration.

## Declaration

```swift
static let completeWhenUserInactive: URLFileProtection
```

## Discussion

Discussion After the first unlock, your app can access the file and continue to access it even if the person using it subsequently locks the device. After access expires, your app can’t access the file until the person using the device unlocks it again.

## See Also

### Protection levels

- [complete](foundation/urlfileprotection/complete.md)
- [completeUnlessOpen](foundation/urlfileprotection/completeunlessopen.md)
- [completeUntilFirstUserAuthentication](foundation/urlfileprotection/completeuntilfirstuserauthentication.md)
- [none](foundation/urlfileprotection/none.md)
