开发者

Does the applicationProtectedDataWillBecomeUnavailable: application delegate method also apply to the keychain?

开发者 https://www.devze.com 2023-03-06 15:05 出处:网络
I\'m having a hard time finding clear documentation about what applicationProtectedDataWillBecomeUnavailable and applicationPr开发者_JS百科otectedDataDidBecomeAvailable actually are signaling the prot

I'm having a hard time finding clear documentation about what applicationProtectedDataWillBecomeUnavailable and applicationPr开发者_JS百科otectedDataDidBecomeAvailable 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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号