tauri-plugin-keystore 2.1.0-alpha.2

Interact with the device-native key storage (Android Keystore, iOS Keychain).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const COMMANDS: &[&str] = &["remove", "retrieve", "store"];

fn main() {
    let result = tauri_plugin::Builder::new(COMMANDS)
        .android_path("android")
        .ios_path("ios")
        .try_build();

    // docs.rs builds this crate for an Android target (see `Cargo.toml`), where
    // the plugin build always fails and is irrelevant to the generated docs.
    if !(cfg!(docsrs) && std::env::var("TARGET").unwrap().contains("android")) {
        result.unwrap();
    }
}