SecAccessible Enum

Definition

An enumeration whose values specify when a keychain item should be readable.

public enum SecAccessible
type SecAccessible = 
Inheritance
SecAccessible

Fields

Name Value Description
Invalid -1

Invalid value.

WhenUnlocked 0

The data is only available when the device is unlocked.

AfterFirstUnlock 1

The data is only available after the first time the device has been unlocked after booting.

Always 2

Always available.

WhenUnlockedThisDeviceOnly 3

Limits access to the item to this device and the device being unlocked.

AfterFirstUnlockThisDeviceOnly 4

The data is only available after the first time the device has been unlocked after booting.

AlwaysThisDeviceOnly 5

Always available.

WhenPasscodeSetThisDeviceOnly 6

Limits access to the item to both this device and requires a passcode to be set and the data is only available if the device is currently unlocked.

Remarks

There are a number of axis to consider for the accessible settings of an item.

Whether the information should be made accessible without entering a passcode, the device being unlocked or always available.

Another one is whether the information should be locked to this device, or whether the information can migrate to a new device via a backup restore.

This value is used by the SecAccessControl constructor and surfaced as a property of the SecRecord.

Applies to