This repository was archived by the owner on Nov 7, 2023. It is now read-only.
File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -96,15 +96,16 @@ CFStringRef getKeychainAccessibility(NSDictionary *options)
96
96
97
97
RCT_EXPORT_METHOD (getItem:(NSString *)key withOptions:(NSDictionary *) options resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
98
98
{
99
- CFStringRef keychainAccessibility = getKeychainAccessibility (options);
100
99
NSString *keychainService = getKeychainService (options);
100
+ /*
101
+ The unique key for kSecClassGenericPassword is composed of: kSecAttrAccount and kSecAttrService
102
+ https://stackoverflow.com/a/22519700
103
+ */
101
104
NSDictionary * getQuery = @{
102
- (__bridge id )kSecClass : (__bridge id )kSecClassGenericPassword ,
103
105
(__bridge id )kSecAttrAccount : key,
106
+ (__bridge id )kSecAttrService : keychainService,
104
107
(__bridge id )kSecReturnData : (__bridge id )kCFBooleanTrue ,
105
- (__bridge id )kSecMatchLimit : (__bridge id )kSecMatchLimitOne ,
106
- (__bridge id )kSecAttrAccessible : (__bridge id )keychainAccessibility,
107
- (__bridge id )kSecAttrService : keychainService
108
+ (__bridge id )kSecMatchLimit : (__bridge id )kSecMatchLimitOne
108
109
};
109
110
110
111
CFTypeRef dataRef = NULL ;
You can’t perform that action at this time.
0 commit comments