Skip to content

idealfoxman0830/background_keychain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reading from Keychain in the background

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.

How to use

1. Download this repository and run the app on your device

https://github.com/evgenyneu/background-keychain.git

Keychain Background Read Demo 1

2. Click "Write to Keychain" button

The app will create a Keychain item with kSecAttrAccessible setting set to accessibleAfterFirstUnlock.

Keychain Background Read Demo 1

3. Finally, lock your device and then unlock it

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.

Keychain Background Read Demo 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages