Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to cast an indirect pointer in Objective-C

I am trying to do some work on my keychain and am following this tutorial here Unfortunately I am getting the following error where it talks about searching the keychain

Cast of an indirect pointer to an Objective-C pointer to 'CFTypeRef *' (aka 'const void **') is disallowed with ARC

This is what the code looks like

 OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchDictionary,(CFTypeRef *)&result);

Any help providing the correct code on how to cast indirect pointer would be greatly appreciated.

like image 255
HurkNburkS Avatar asked Jul 23 '13 23:07

HurkNburkS


1 Answers

Use void * instead:

 OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)searchDictionary,(void *)&result);
like image 140
cncool Avatar answered Sep 27 '22 18:09

cncool