LatchAccessibility
public enum LatchAccessibility: RawRepresentable
LatchAccessibility defines the access restrictions for the underlying keychain items. It maps 1:1 with kSecAttrAccessible values.
-
Data can only be accessed while the device is unlocked. This is recommended for items that only need be accesible while the application is in the foreground.
Data with this attribute will migrate to a new device when using encrypted backups.
Declaration
Swift
case WhenUnlocked
-
Data can only be accessed once the device has been unlocked after a restart. This is recommended for items that need to be accesible by background applications.
Data with this attribute will migrate to a new device when using encrypted backups.
Declaration
Swift
case AfterFirstUnlock
-
Data can always be accessed regardless of the lock state of the device. This is not recommended for anything except system use.
Items with this attribute will migrate to a new device when using encrypted backups.
Declaration
Swift
case Always
-
Data can only be accessed while the device is unlocked. This is recommended for items that only need be accesible while the application is in the foreground.
Items with this attribute will never migrate to a new device, so after a backup is restored to a new device, these items will be missing.
Declaration
Swift
case WhenUnlockedThisDeviceOnly
-
Data can only be accessed once the device has been unlocked after a restart. This is recommended for items that need to be accessible by background applications.
Items with this attribute will never migrate to a new device, so after a backup is restored to a new device these items will be missing.
Declaration
Swift
case AfterFirstUnlockThisDeviceOnly
-
Data can always be accessed regardless of the lock state of the device. This option is not recommended for anything except system use.
Items with this attribute will never migrate to a new device, so after a backup is restored to a new device, these items will be missing.
Declaration
Swift
case AlwaysThisDeviceOnly
-
Create a new LatchAccessibility value using a kSecAttrAccessible value.
:param: rawValue A CFString representing a kSecAttrAccessible value.
Declaration
Swift
public init?(rawValue: CFString)
-
Get the rawValue of the current enum type. Will be a kSecAttrAccessible value.
Declaration
Swift
public var rawValue: CFString