apple-native-keyring-store

Crates.ioapple-native-keyring-store
lib.rsapple-native-keyring-store
version0.2.1
created_at2025-08-23 01:17:11.098281+00
updated_at2025-09-25 23:51:42.784327+00
descriptionApple-native credential store for keyring
homepagehttps://github.com/open-source-cooperative/keyring-rs/wiki/Keyring
repositoryhttps://github.com/open-source-cooperative/apple-native-keyring-store.git
max_upload_size
id1807116
size115,102
Daniel Brotsky (brotskydotcom)

documentation

README

Apple-native Keyring Store

build crates.io docs.rs

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.

Usage

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.

Changelog

See the release history on GitHub for full details.

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 0

cargo fmt