Global Variable

kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly

The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user.

Declaration

let kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly: CFString

Discussion

After the first unlock, the data remains accessible until the next restart. This is recommended for items that need to be accessed by background applications. Items with this attribute do not migrate to a new device. Thus, after restoring from a backup of a different device, these items will not be present.

See Also

Accessibility Values

let kSecAttrAccessibleAfterFirstUnlock: CFString

The data in the keychain item cannot be accessed after a restart until the device has been unlocked once by the user.

let kSecAttrAccessibleAlways: CFString

The data in the keychain item can always be accessed regardless of whether the device is locked.

let kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly: CFString

The data in the keychain can only be accessed when the device is unlocked. Only available if a passcode is set on the device.

let kSecAttrAccessibleAlwaysThisDeviceOnly: CFString

The data in the keychain item can always be accessed regardless of whether the device is locked.

let kSecAttrAccessibleWhenUnlocked: CFString

The data in the keychain item can be accessed only while the device is unlocked by the user.

let kSecAttrAccessibleWhenUnlockedThisDeviceOnly: CFString

The data in the keychain item can be accessed only while the device is unlocked by the user.