Reputation: 669
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?
Upvotes: 2
Views: 358
Reputation: 1027
I just posted this followup on the Apple dev forum thread:
BEWARE anyway :
I recently added this attribute to hide some items from my iOS application when the iCloud keychain is active and can be seen on a Mac, also because the MacOS version of our app is now almost ready.
And we faced critical situation where iOS users where unable to store their purchases in the Keychain because of this obscure and undocumented behaviour :
So to correctly migrate to using this attribute one should :
Future delete can succeed with the attribute, but the previous steps work with only one attempt to delete in any case we tested.
Upvotes: 1
Reputation: 669
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.
Upvotes: 1