【问题标题】:err == errSecAuthFailed works fine on simulator but fails on deviceerr == errSecAuthFailed 在模拟器上工作正常,但在设备上失败
【发布时间】:2023-03-24 03:34:01
【问题描述】:

我尝试使用

err == errSecAuthFailed

喜欢这里link

这在模拟器上运行良好,但在 ios 设备上失败。有人知道为什么吗? 正如您在链接上看到的那样,Apple 也使用它。当我在设备上尝试这个时,我得到了

Use of undeclared identifier 'errSecAuthFailed'

谢谢!

【问题讨论】:

  • 是运行时错误还是编译时错误?您的 Base SDK 版本是多少?
  • 编译错误,我使用 SDK 5.0 作为基础 SDK
  • 尝试在发生错误的文件顶部添加#import 。只是猜测,不幸的是。
  • @zrxq 如果你想添加你的评论作为答案,我会接受这个

标签: iphone objective-c xcode4 ios5


【解决方案1】:

尝试在发生错误的文件顶部添加#import <Security/SecBase.h>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多