Keychain value removed after adding com.apple.security.application-groups
After adding the necessary rights to enable application groups, my user credentials were erased (they were saved in the keychain). The query I'm using to save the password is the following:
NSData *valueData = [value dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *query = @{(__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrAccessible: (__bridge id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
(__bridge id)kSecAttrService: service,
(__bridge id)kSecAttrAccount: key,
(__bridge id)kSecValueData: valueData,
};
And then extracting it:
NSDictionary *query = @{(__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrAccessible: (__bridge id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
(__bridge id)kSecAttrService: service,
(__bridge id)kSecReturnAttributes: (__bridge id)kCFBooleanTrue,
(__bridge id)kSecReturnData: (__bridge id)kCFBooleanTrue};
The only key my rights have:
com.apple.security.application-groups
What is the array with my bundle id. Am I missing something in the permissions file?
+3
source to share
No one has answered this question yet
Check out similar questions: