A key whose value indicates when a keychain item is accessible.
SDKs
- iOS 4.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Security
Declaration
let kSecAttrAccessible: CFString
Discussion
The corresponding value, one of those found in Accessibility Values, indicates when your app needs access to the data in a keychain item. Choose the most restrictive option that meets your app’s needs so that the system can protect that item to the greatest extent possible. For more information, see Restricting Keychain Item Accessibility.
Important
You can use this attribute for macOS keychain items only if you also set a value of true
for the k
key, the k
key, or both. For any item marked as synchronizable, the value for the k
key may only be one whose name does not end with This
, as those cannot sync to another device.
Note
The app must provide the contents of the keychain item (k
) when changing this attribute in iOS 4 and earlier.