tauri-apps / tauri-apps/plugins-workspace
[feat][notification] Add dev mode option
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
I know that the notification plugin can only work properly after installing the application via `.msi` or `nsis`. Otherwise, it can only use the identifier of other applications (such as `powershell`) to send notifications.
The problem here is that tauri determines whether to use dev mode by [checking if the executable is in the `target/` directory](https://docs.rs/crate/tauri-plugin-notification/2.0.1/source/src/desktop.rs#184-188).
This works fine for typical Rust applications; however, when I compile it into a dynamic library for Python to call, this method fails because the executable is `python` in another directory.
---
Here is my current solution:
But this is not ideal because tauri-cli will raise error for such invalid identifiers.
I hope the notification plugin can add a [`fn dev(self, enable: bool)` option](https://docs.rs/tauri-plugin-notification/latest/tauri_plugin_notification/struct.NotificationBuilder.html) to allow users to manually set dev mode.
---
*I haven't checked the situation on Linux and macOS yet*
Contributor guide
Assessment
This issue has not been assessed yet.