Closed allachetan closed 2 months ago
I have tested a production build of this repository's example, and it works perfectly.
Can you please provide a GitHub repository containing a minimal reproduction of your project? I would like to test it on my end and debug the issue for you.
You can also check this https://github.com/ahkohd/tauri-macos-menubar-app-example template on building a menubar application with a tray icon using the tauri-nspanel plugin.
You can get more information about why your app crashed by running the binary of the app in terminal and inspecting the standard output.
https://github.com/user-attachments/assets/f02c64bd-14cb-4c2d-9d70-75dfc11603ce
Right-click on your production build "App.app", On the context menu, click on "Show Package Contents"
Thank you for your response. I will try debugging later tonight or this week with your method, thank you for showing me!
I have created a repo with the minimal implementation here: https://github.com/allachetan/tauri-macos-spotlight-with-tray. I tried running the build command again, but same issue of an immediate crash after attempting to open the app even though it works fine with the run dev command.
Update: I was not able to get it working with this codebase, however I was able to get the solution I was looking for follwing your repo https://github.com/ahkohd/tauri-macos-menubar-app-example using the tauri nspanel plugin.
The app runs fine with the "run dev" command, but quits immediately after opening the built version of the app. I suspect there might be a bug in the
init_spotlight_window
function. I have only added a basic implementation of the system tray from the Tauri docs shown below (no other additions to the codebase).My macos version is: 13.6.6 (intel). However I tested this on my arm mac and it also did not work.
Code:
Any help with this would be greatly appreciated :). In
init_spotlight_window
code seems to be able to create the panel without issue. So the issue seems to be within the following code insideinit_spotlight_window
: