tauri-plugin-app-icon 0.1.0

A Tauri plugin to programmatically change the app icon.
Documentation

Tauri Plugin — App Icon

Crates.io License

A Tauri plugin to programmatically change the app icon at runtime on iOS and Android.

Platform Support

Platform Supported
iOS
Android
macOS ❌ (stub)
Windows ❌ (stub)
Linux ❌ (stub)

Installation

Add the plugin to your Cargo.toml:

[dependencies]
tauri-plugin-app-icon = "0.1"

Register the plugin in your Tauri app:

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_app_icon::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Commands

Command Description
is_supported Returns whether the device supports alternate icons.
get_name Returns the name of the current alternate icon (or null).
change Switches the app icon to a named alternate icon.
reset Resets the app icon back to the primary/default icon.

JavaScript / TypeScript

import { isSupported, getName, change, reset } from "tauri-plugin-app-icon";

const supported = await isSupported();
if (supported) {
    await change({ name: "dark-icon" });
    const name = await getName();
    await reset();
}

License

MIT