If the user deletes the app, must something be done to ensure that the launchd agent is removed (or is that something that does not need to be worried about in general)? For more context, I am creating a launchd agent using the SMAppService.
I am only an amateur so apologies if this is a bit of a stupid question.
Hmmm, that’s a good question, one that I’ve not looked into previously.
I ran a quick test today and, at least on macOS 13, deleting the app does not unregister the agent. I can see why that’s inconvenient, but this sort of behaviour is pretty common on macOS. Apps can be installed anywhere, including removable volumes, and can be installed and removed via a variety of means, and that makes it hard for the system to know when it’s the right time to unregister the agent.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"