I'm targeting the Mac App Store.
That makes things tricky. In general, Mac App Store apps are not allowed to make changes to the system as a whole, which rules out all the
launchd
options.
I can see two feasible here:
Apple events — If you make your app scriptable, other apps can request that you do work by sending you Apple events.
TCP/IP — Mac App Store apps are allowed to opening listening sockets, assuming you apply the
com.apple.security.network.server
entitlement. There’s a couple of gotchas here. The obvious one is security: You don’t want your app accepting requests from across the network. The less obvious one is App Review. My experience is that they look carefully at apps with the com.apple.security.network.server
to ensure that they provide some obvious user-level server feature.
If I were in your shoes, I’d do the Apple events thing.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"