ARC only manages Objective-C types. If you use Core Foundation types, you need to specify the ARC to which this variable belongs, using __bridge , __bridge_retained or __bridge_transfer .
Here's Apple 's official documentation on free ARC bridging, or see this blog post (scroll down to Toll-Free Bridging) for a great overview.
For example:
NSData *inData = nil; CFTypeRef inTypeRef = (__bridge CFTypeRef)inData; OSStatus status = SecItemCopyMatching( (__bridge CFDictionaryRef)searchDictionary, &inTypeRef);
Simon whitaker
source share