ARC is giving me a hard time with following cast:
NSDictionary *attributes;
SecItemCopyMatching((__bridge CFDictionaryRef)keychainItemQuery, (CFTypeRef *)&at
As we were doing something similar things and using the example above, we were facing another problem:
CFDataRef resultRef;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchDictionary,
(CFTypeRef *)&resultRef);
NSData* result = (__bridge_transfer NSData*)resultRef;
This will result in an EXEC_BAD_ACCESS, because resultRef is not set to any adress and points somewhere to the memory.
CFDataRef resultRef = nil;
This will fix the error.