setIconWithAsTemplate

external fun setIconWithAsTemplate(icon: String?, asTemplate: Boolean): Promise<Void>(source)
external fun setIconWithAsTemplate(icon: Image?, asTemplate: Boolean): Promise<Void>(source)
external fun setIconWithAsTemplate(icon: Uint8Array<*>?, asTemplate: Boolean): Promise<Void>(source)
external fun setIconWithAsTemplate(icon: ArrayBuffer?, asTemplate: Boolean): Promise<Void>(source)
external fun setIconWithAsTemplate(icon: ReadonlyArray<Double>?, asTemplate: Boolean): Promise<Void>(source)

Sets a new tray icon and template status atomically. macOS only.

Note that you may need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file:

[dependencies]
tauri = { version = "...", features = ["...", "image-png"] }