App built with xcode 5 can't read password stored for app build with xcode 4.6.3

144 Views Asked by At

My password store doesn't seem to be compatible across different XCode builds.

I'm managing a password with SFHFKeychainUtils. If I build my app with XCode 4.6.3, then do a subsequent build with XCode 5.0, I am getting a (null) back from this call:

NSString *p = [SFHFKeychainUtils getPasswordForUsername:username andServiceName:DEF_SERVICENAME error:&error];

and I stored it using this call:

[SFHFKeychainUtils storeUsername:username andPassword:password forServiceName:DEF_SERVICENAME updateExisting:YES error:&error];

Has anyone experienced similar issues and have you found a solution for dealing with this? It will be bad if my updated app can't read the stored data from my current app.

This line is getting the exact same dictionary in both builds:

OSStatus status = SecItemCopyMatching((CFDictionaryRef) attributeQuery, (CFTypeRef *) &attributeResult);

I get the following error:

 errSecItemNotFound                          = -25300,  /* The specified item could not be found in the keychain. */
0

There are 0 best solutions below