How can I do some actions before exit on tauri v2? #10531
-
I wanna handle some actions when the app exits, such as terminating a process manually. In Besides using plugins, are there any other ways to access |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Replace |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your quick answer 🚀 It solved my problem! |
Beta Was this translation helpful? Give feedback.
Replace
builder.run().expect()
withbuilder.build().expect().run()
and then therun
function will give you access to the RunEvents: https://github.com/tauri-apps/tauri/blob/dev/examples/api/src-tauri/src/lib.rs#L146-L152