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

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!


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.

Need Your Help

Images in cache not getting used

php ajax image caching manifest

I'm working on this web app for which I'd like to cache some static content to lower loading times on a slow connection. Other parts are being generated through PHP and AJAX and can therefor not be

How to get element ID dynamically in javascript

javascript jquery html jquery-ui

I have a major div which holds a group of divs. when divs inside are selected, I need to get their id in a dynamically way.