1
Ich möchte ein Wörterbuch der Attribute von Keychain erhalten, aber ich habe eine NSArray
mit 1 Element NSDictionary
. Hier ist mein Code zu bekommen Attribute:Getting Attribute von Keychain gibt NSArray
NSMutableDictionary *queryDictionary = [KeychainQueryDictionaryWithServiceAndIdentifier(serviceName, identifier) mutableCopy];
queryDictionary[(__bridge id)kSecReturnAttributes] = (__bridge id)kCFBooleanTrue;
queryDictionary[(__bridge id)kSecMatchLimit] = (__bridge id)kSecMatchLimitAll;
CFDictionaryRef result = nil;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)queryDictionary, (CFTypeRef *)&result);
if (status != errSecSuccess) {
NSLog(@"Unable to fetch account info with identifier \"%@\" (Error %li)", identifier, (long int)status);
return nil;
}
id ret = (NSDictionary *)CFBridgingRelease(result);
Und hier einige Infomationen von der Konsole
Warum ret
ist ein NSArray
Typ?