Ios 获取Keychain的属性返回NSArray

Ios 获取Keychain的属性返回NSArray,ios,objective-c,iphone,keychain,Ios,Objective C,Iphone,Keychain,我想得到钥匙链属性的字典,但我得到了一个NSArray,其中有一个NSDictionary元素。以下是我获取属性的代码: NSMutableDictionary *queryDictionary = [KeychainQueryDictionaryWithServiceAndIdentifier(serviceName, identifier) mutableCopy]; queryDictionary[(__bridge id)kSecReturnAttributes] = (__bridge

我想得到钥匙链属性的字典,但我得到了一个
NSArray
,其中有一个
NSDictionary
元素。以下是我获取属性的代码:

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);
这里有一些来自控制台的信息

为什么
ret
NSArray
类型?

查询字典[(\u网桥id)kSecMatchLimit]=(\u网桥id)kSecMatchLimitOne;

修好了

queryDictionary[(\uu桥id)kSecMatchLimit]=(\uu桥id)kSecMatchLimitOne;

修好了