Example app
Try credential storage and authentication on a simulator or device with the included Keychain workbench.
The app lets you switch between generic passwords and internet credentials, choose protection options, and inspect the result of each operation. Retrieved passwords stay hidden until you reveal them.
Try the credential flow
- Select Generic password or Internet credentials.
- Enter a username and password.
- Choose the protection settings for your platform.
- Tap Save, then Load to read the saved entry.
- Tap Reset to clear both credential types in the selected synchronization scope.
Use List to inspect the stored service or server identifiers. On iOS, try the cloud synchronization setting with the same identifier to see that local and synchronizable entries are separate.
Run locally
From the repository root, install the workspace dependencies using the Node version in .node-version and the Yarn version in package.json:
yarn install --immutableFor iOS, install Ruby dependencies and pods:
cd KeychainExample
bundle install
bundle exec pod install --project-directory=iosStart Metro from the repository root:
yarn workspace KeychainExample startThen, in another terminal at the repository root:
yarn workspace KeychainExample iosyarn workspace KeychainExample androidExplore the source
Simulator tests can verify query behavior. Use real devices to verify hardware protection and the authentication behavior you ship.