Working on modernizing – have a separate daemon now with SMLoginItemSetEnabled() … but how do I communicate with it? Is there a way to create my own XPC service from it?

@uliwitness yes, you can create an XPC Service via a Mach name, and connect to it from your client. This works because SMLoginItemSetEnabled creates a launchd agent.

@mgorbach Where do I find out/specify the Mach name? I tried creating the service's listener with a mach name, but then -resume immediately returns, so I take it that's client-side.

@uliwitness @mgorbach IIRC you need to have your mach service name set up in the Launch{Agents,Daemons} plist file, which I’m not sure you can customize if you’re using SMLoginItemSetEnabled?

@uliwitness @mgorbach unless there’s some magic Info.plist bundle stuff I’m not aware of.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!