Search code examples
ioskeychain

Relevance of kSecAttrIsInvisible in iOS


The Keychain item attribute key kSecAttrIsInvisible is described as:

A key whose value is a Boolean indicating the item's visibility.

This has been available in the iOS SDK since iOS 2.0+.

I assume that this may hide the Keychain item from appearing on a macOS system where the user can view the Keychain items via the Keychain Access app.

My question is, what does enabling this attribute key do on an iOS device, if anything?


Solution

  • I received a response to this on the Apple Developer forums:

    I assume that this may hide the Keychain item from appearing on a macOS system where the user can view the Keychain items via the Keychain Access app.

    Correct.

    My question is, what does enabling this attribute key do on an iOS device, if anything?

    Not much. Given that iOS does not have a general-purpose way to view keychain items, the only specific effect I can think of relates to iCloud Keychain. If the item gets sync’d over to a Mac via iCloud Keychain, you might want to make it invisible there.