I want to save two passwords (one app pin and one backend pin) in my keychain and am wondering how this should work.
I am using the KeychainItemWrapper with to different identifiers.
KeychainItemWrapper *kcw1 = [[KeychainItemWrapper alloc] initWithIdentifier:id1 accessGroup:nil];
KeychainItemWrapper *kcw2 = [[KeychainItemWrapper alloc] initWithIdentifier:id2 accessGroup:nil];
and I am using either one to save and retrive the app or the backend pin.
I use :
[self.kcw1 setObject:aVerifyCode forKey:(__bridge id) kSecValueData]
[self.kcw2 setObject:aAppPin forKey:(__bridge id) kSecValueData]
But it doesn't work - result is -25299 - The specified item already exists in the keychain
So how can I save multiple passwords in my keychain?
[[KeychainItemWrapper alloc] id1 accessGroup:nil];
<== how does this even compile? – Garrard