This is an iOS demo app that reads from Keychain while being in the background.
Here is how it works:
-
First, we write to Keychain with
accessibleAfterFirstUnlock
. -
Then we lock the device.
-
While in the background, the app reads from Keychain and updates a label on screen.
-
Finally, we unlock the device and check if that read was successful.
This app was created in order to check if it's required to set access access level (kSecAttrAccessible
) when reading from keychain. See the following discussion for more info.
https://github.com/evgenyneu/background-keychain.git
The app will create a Keychain item with kSecAttrAccessible
setting set to accessibleAfterFirstUnlock
.
After entering the background, the app will read from the Keychain and update a label on screen. After unlocking, you will see if that background read was successful.