ios - SecCopyErrorMessageString swift 给出 "Use of unresolved identifier"

标签 ios swift keychain

尝试使用 SecCopyErrorMessageString 来解释 errorCode。 swift :

    var result: OSStatus
    result = SecItemAdd(query as CFDictionary, nil);


    if result != errSecSuccess {
    let errorDescription = SecCopyErrorMessageString(result,nil)
   //     NSLog("Keychain Error: %@", errorDescription)

“Unresolved identifier”的错误从“SecCopyError...”开始

最佳答案

SecCopyErrorMessageString 函数仅在 iOS 11.3 版本中可用。在此之前,它只能在 OS X 上使用。

关于ios - SecCopyErrorMessageString swift 给出 "Use of unresolved identifier",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34053049/

相关文章:

ios - 数据txt文件在iPhone模拟器中读取时有效,但在iPhone设备上无效?

ios - Swift 货币格式 ISO 标准转换问题

swift - 节点的新位置

iphone - SFHFKeychainUtils。 iOS 钥匙串(keychain)。弧兼容

ios - 如何在 Swift 中使用常规表达式设置信用卡 PAN NUMBER 的模式?

iOS 如何测试调用 [[UIApplication sharedApplication] openUrl :someUrl] 的方法

android - 在响应式网站上检测移动设备的最大视频分辨率支持

ios - @State破坏了我位于导航栏的TextField-SwiftUI

ios - 将加密 key 存储在 defaultConfiguration 中是否安全?

ios - 在 iOS8 中只能通过指纹验证才能访问钥匙串(keychain)