Is my understanding of kSecAttrAccessible– WhenUnlocked & AfterFirstUnlock correct?

For kSecAttrAccessibleWhenUnlocked, data is accessible "while the device is unlocked by the user", while for kSecAttrAccessibleAfterFirstUnlock data is accessible after the first unlock by the user "until the next restart" according to Apple's documentation.

In this use case timeline:

  1. Turn on device
  2. Unlock device
  3. Lock device
  4. Unlock device
  5. Restart device
  6. Unlock device

Would the following be correct?

For WhenUnlocked, data is available:

  • Between 2 and 3
  • Between 4 and 5
  • After 6

AfterFirstUnlock, data is available:

  • Between 2 and 5
  • After 6

Thanks!

Answered by ForumsContributor in
Accepted Answer

Would the following be correct?

Yes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is my understanding of kSecAttrAccessible– WhenUnlocked & AfterFirstUnlock correct?
 
 
Q