I could have sworn this worked differently in previous versions of iOS, but as of iOS 4.0 it looks like my app's keychain items are not removed when the app is removed. However, it looks like some are cleared when the app is upgraded without first removing?
Can someone provide a clear explanation of when iOS keychain items are removed?
You can't remove a keychain item from iOS device. The keychain is shared between applications, so another app could be using the same credentials. You should just leave the info alone when your app is removed. The keychain will persist even after the app is removed.
While the user's keychain database is backed up to iCloud, it remains protected by a UID-tangled key. This allows the keychain to be restored only to the same device from which it originated, and it means no one else, including Apple, can read the user's keychain items.
Overview. Keychain items are encrypted using two different AES-256-GCM keys: a table key (metadata) and a per-row key (secret key). Keychain metadata (all attributes other than kSecValue) is encrypted with the metadata key to speed searches and the secret value (kSecValueData) is encrypted with the secret key.
Deleting a specific password from Keychain is an easy task that can be accomplished right from Keychain Access: Open Keychain Access from the Utilities folder (Applications > Utilities) in Finder. Find the specific entry that you want to remove from the system. Control-click the entry and click on Delete [entry].
As answered here, and somewhere else (I can't remember where I read it), the keychain will persist even after the app is removed. I am almost positive that the keychain isn't cleared unless you explicitly delete an item in it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With