首页 > 解决方案 > 如何检测 iOS 钥匙串项目是否尚不可用?(首次解锁前)

问题描述

在设备解锁之前kSecAttrAccessibleAfterFirstUnlock在后台访问项目时是否出现特定错误或行为?

https://developer.apple.com/documentation/security/ksecattraccessibleafterfirstunlock?language=objc

苹果表示:

对于需要由后台应用程序访问的项目,建议使用此选项。

但是,在某些情况下,系统仍然可以在此之前启动应用程序,不是吗?

标签: iossecuritykeychain

解决方案


据我所知,返回“错误代码-25308 (errSecInteractionNotAllowed)”,但我还无法验证。

来源:https ://developer.apple.com/documentation/security/1542001-security_framework_result_codes/errsecinteractionnotallowed?language=objc


推荐阅读