最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

[已解决]swift代码出错:Cast of an indirect pointer to an Objective-C pointer to ‘CFTypeRef *’ (aka ‘const void **’) is disall

iOS crifan 1106浏览 0评论

代码:

        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

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
62 queries in 0.126 seconds, using 18.84MB memory