applicationProtectedDataWillBecomeUnavailable: 应用程序委托方法是否也适用于钥匙串?

发布于 2024-11-08 05:34:52 字数 377 浏览 1 评论 0原文

我很难找到关于 applicationProtectedDataWillBecomeUnavailable 和 applicationProtectedDataDidBecomeAvailable 实际上正在发出保护信号的明确文档。会话 209 似乎表明委托方法意味着钥匙串和受保护的文件都变得不可用,但文档仅引用文件。

我将我的钥匙串设置为 kSecAttrAccessibleWhenUnlockedThisDeviceOnly ,其中文档表明这意味着钥匙串仅在应用程序位于前台时可用,但后来我让我的应用程序尝试在 applicationDidEnterBackground 委托方法中访问其钥匙串,并且它能够。

那么,有人可以帮我澄清这一点,并启发我如何检测钥匙串何时对我的应用程序变得不可用吗?谢谢!

I'm having a hard time finding clear documentation about what applicationProtectedDataWillBecomeUnavailable and applicationProtectedDataDidBecomeAvailable actually are signaling the protection of. Session 209 seems to suggest that the delegate methods imply that both the keychain and the protected files are becoming unavailable, but the documentation only refers to files.

I have my keychain set to kSecAttrAccessibleWhenUnlockedThisDeviceOnly where the documentation suggests that means the keychain is only available when the application is in the foreground, but then I had my application try to access its keychain in the applicationDidEnterBackground delegate method and it was able to.

So, can someone clarify this for me and enlighten me about how to detect when the keychain is becoming unavailable to my application? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∞琼窗梦回ˉ 2024-11-15 05:34:52

回答我自己的问题:据我所知,是的,applicationProtectedDataWillBecomeUnavailableapplicationProtectedDataDidBecomeAvailable 指的是应用程序的钥匙串和受保护文件。

我有一个应用程序将数据存储在钥匙串中,此时应用程序开始报告两个委托方法,所以这就是我的假设的基础。

To answer my own question: as far as I can tell, yes, the applicationProtectedDataWillBecomeUnavailable and applicationProtectedDataDidBecomeAvailable refer to both the keychain and protected files for the application.

I have an application that stored data in the keychain at which point the application started reporting the two delegate methods, so that's what I'm basing my assumption on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文