Hi,
I am working on a large upgrade to my Mac app and when the user has setup to authenticate via TouchID in the shipping version and then runs my upgrade, SecItemCopyMatching returns not found instead of displaying the Touch ID authentication view. I'm using the exact same code to retrieve the users password which is:
NSDictionary *query = @{ (id)kSecClass: (id)kSecClassGenericPassword, (id)kSecAttrService:@"sameKeychainStringAsBefore", (id)kSecReturnData:@YES, (id)kSecUseOperationPrompt: @"my message", }; CFTypeRef dataTypeRef = NULL; OSStatus status = SecItemCopyMatching((CFDictionaryRef)(query), &dataTypeRef);
Since it's the same code to retrieve it in the old and new app, it would appear that the system doesn't think it's the same app. However, I can retrieve other keychain items from the new app so it appears to be signed properly.
In addition, I have a different build of this app that uses a different bundle ID (same app but for testing purposes) and it is able to retrieve the password using the test app's kSecAttrService identifier so it's almost as if the system thinks it's the other app even though the bundle id is different.
The bottom line is what is the keychain api using about the app (other than bundle ID) to determine if it should have access? Thanks! //Ray