KeychainAccess icon indicating copy to clipboard operation
KeychainAccess copied to clipboard

The specified item already exists in the keychain.

Open Saulenco opened this issue 5 years ago • 4 comments

On iPad 4 (iOS 10.3.3) when i'm trying to update a value i'm getting this exception: The specified item already exists in the keychain.

this is how i use it:

 let keychain = Keychain(service: key).accessibility(.afterFirstUnlock)
 do { 
       try keychain.set(value, key: MyKey)
        } catch let error {
            print(error.localizedDescription)
        }

Saulenco avatar Oct 01 '19 08:10 Saulenco

I just ran into the very same issue, it only happened once at app boot/session start and then never again. Does anybody know what could be the cause and how to avoid it in the future? For now I've added a removal of the items before trying to set them again to avoid this issue in the future but I'm not sure if this is a good idea or not. Anybody here who could share some light on the best practices for when the keychain can't be written to?

snoozemoose avatar Oct 21 '19 12:10 snoozemoose

Any update on this?

EthanLipnik avatar Aug 24 '21 02:08 EthanLipnik

I'm seeing this issue running under iOS 17.4.

nodediggity avatar Feb 17 '24 09:02 nodediggity