Post

Replies

Boosts

Views

Activity

Reply to Background service on MacOS
In the context of macOS when we say application (or app) we mean something that’s double clickable in the Finder, shows up in the Dock, has a menu bar, and so on. Your product doesn’t do that, so it’s not an app. How do you want to managed install and uninstall? I've made this Rust application being packed in to a PKG installer, which installs a valid terracotta.app bundle to Application dir. Therefore, Users can run this application by cdouble clicking the icon in Finder and it will show up in the dock. So, THIS IS A APPLICATION. What is the desired lifecycle of your program? I want to make my program being runned in background ONLY AFTER users manually launch the application. Therefore, their won't be much performance waste when my application hasn't being launched since the computer start. And the application will exit and no longer running in the background if certain condition is met, for example, there's no traffic for the application on the port-forward feature. (Of course, there will be a pop-up or other kinds of notification.) Or, if this expectation cannot be fulfilled, constantly running in the background is acceptable.
Jul ’25
Reply to Background service on MacOS
After days of trail, I've successfully made my application a background daemon by adding a post install script: https://github.com/burningtnt/Terracotta/blob/master/build/macos/scripts/postinstall However, this will write a file in /Library/LaunchAgents/, and it cannot be deleted while uninstalling my application. Any solution to address this?
Jul ’25