You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
window.set_icon() always throws errors on macOS (with icns) and does not set the dock icon. This works fine with Windows (ico) and Linux (png) in which both the window icon and the dock icon is changed.
As far as I know, this can be done using the dock api on electron with something like: dock.setIcon(icon)
To Reproduce
Steps to reproduce the behavior:
Create a new Tauri app on the latest version of macOS
Go to src-tauri/src/main.rs
Add a setup(|app|) function to the app build stage.
let main_window = app.get_window("main").unwrap()
main_window
.set_icon(Icon::File(PathBuf::from_str("<path to icns file>").unwrap(),)).unwrap();
See error:
thread 'main' panicked at 'could not determine icon extension', /Users/xtremedevx/.cargo/registry/src/github.com-1ecc6299db9ec823/tauri-runtime-wry-0.2.1/src/lib.rs:467:8
Expected behavior
Since macOS does not have a window icon, there should be a way to change the icon of the app on the dock.
app.set_dock_icon() or another method could be used to set the icon of the app on the dock.
Describe the bug
window.set_icon()
always throws errors on macOS (withicns
) and does not set the dock icon. This works fine with Windows (ico
) and Linux (png
) in which both the window icon and the dock icon is changed.As far as I know, this can be done using the dock api on electron with something like:
dock.setIcon(icon)
To Reproduce
Steps to reproduce the behavior:
src-tauri/src/main.rs
setup(|app|)
function to the app build stage.let main_window = app.get_window("main").unwrap()
Expected behavior
Since macOS does not have a window icon, there should be a way to change the icon of the app on the dock.
app.set_dock_icon()
or another method could be used to set the icon of the app on the dock.Platform and Versions (required):
The text was updated successfully, but these errors were encountered: