Tauri Plugin — App Icon
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:
[]
= "0.1"
Register the plugin in your Tauri app:
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