First a word on terminology:
I'm working on an application 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.
There are a variety of other ways to run programs on the Mac, including command-line tools, launchd
daemons, launchd
agents, and login items. And programs without UIs can still use app-like packaging, resulting in a background-only app or a UI element.
The best path forward here depends on two criteria:
- What is the desired lifecycle of your program?
- How do you want to managed install and uninstall?
The first one is key. Do your want your program to run all the time? Automatically for each user who logs in? Or only when the user explicitly starts it, with the implication being that it stops when the user logs out?
Most network-facing programs want to run all the time, with just a single instance of the running program, and thus are usually run as a launchd
daemon. Is that what you’re looking for?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"