代码:
NSMutableDictionary *outDictionary = nil;
if (! SecItemCopyMatching((CFDictionaryRef)tempQuery, (CFTypeRef *)&outDictionary) == noErr)
出错:
KeychainItemWrapper/KeychainItemWrapper.m:132:63: Cast of an indirect pointer to an Objective-C pointer to ‘CFTypeRef *’ (aka ‘const void **’) is disallowed with ARC
如图:
Cast of an indirect pointer to an Objective-C pointer to ‘CFTypeRef *’ (aka ‘const void **’) is disall
ios – how to cast an indirect pointer in Objective-C – Stack Overflow
改为:
if (! SecItemCopyMatching((CFDictionaryRef)tempQuery, (void *)&outDictionary) == noErr)
即可。
转载请注明:在路上 » [已解决]swift代码出错:Cast of an indirect pointer to an Objective-C pointer to ‘CFTypeRef *’ (aka ‘const void **’) is disall