Crates.io | apple-native-keyring-store |
lib.rs | apple-native-keyring-store |
version | 0.2.1 |
created_at | 2025-08-23 01:17:11.098281+00 |
updated_at | 2025-09-25 23:51:42.784327+00 |
description | Apple-native credential store for keyring |
homepage | https://github.com/open-source-cooperative/keyring-rs/wiki/Keyring |
repository | https://github.com/open-source-cooperative/apple-native-keyring-store.git |
max_upload_size | |
id | 1807116 |
size | 115,102 |
This is a keyring credential store provider that stores credentials in the native macOS and iOS secure stores. It’s compatible with keyring-core v0.7 and later.
If you are writing clients app that are not code-signed by a provisioning profile (e.g., command-line apps), then you should use the keychain
module of this store, which accesses the macOS keychain. (This is the module which is most compatible with keyring v3 and earlier.) Specify the keychain
feature when you build.
If you are writing client apps that are code-signed by a provisioning profile, then you should use the protected
module of this store, which accesses the Apple Protected Data store. This module supports synchronizing credentials across devices via iCloud. It also supports requiring biometric authentication for credential access (although such credentials can be not be sync’d across devices). Specify the protected
feature when you build.
If you are writing an iOS app, then you have no choice but to use the protected store. Specify the protected
feature when you build.
To use this keychain-compatible credential store provider, you must take a dependency on the keyring-core crate and on this crate. Then the exact formula for how to instantiate a credential store and/or a specific entry depends on whether you are using keychain or protected storage, and whether you are using features such as biometric authentication or iCloud synchronization. See the docs for this crate for more detail. The instantiation
example in this crate shows all of the various possibilities and how to use them (but of course the protected
examples require a code-signed app).
The operations
example in this crate builds a static library that can be embedded in an XCode app with a provisioning profile such as the rust-on-ios test harness. It’s a good source of usage samples if you are writing a sandboxed app.
See the release history on GitHub for full details.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.