Anyone submitted or know of an application in the Mac App Store that uses launchd?

564 views Asked by At

Just wondering if anyone has sucessfully submitted an app or know of an app that exists in the Mac App Store that uses launchd.

Thanks.

2

There are 2 answers

1
Alex Gray On BEST ANSWER

Is there ANY way to ASK apple, directly, about stuff like this? Submitting a Dummy App - in the off chance it will be rejected - ain't a very good way to know if launchd IS or IS NOT permitted in the app-store. They (apple) simply could have rejected your app for being useless or lame, lol! The official guidelines are SO not comprehensive, especially in terms of technical limitations - and I cant for the life of me find an official channel to speak with the App Store "people". After hyping launchd like crack for the past 5 years, it would be obnoxious if Apple indeed has a blanket policy against apps that make use of its functionality... launchd, as freaky as it is... is pretty damn good, and IMO, a requirement for almost every piece of software that "does" anything useful. humph.

Follow up.. although not a answer to this specific question, it shines light on the subject...

"It is launchd that is immediately responsible for capturing the exit status of MAS apps, and this is why store_helper and storeagent are launched when you use ‘open foo.app’, but not when calling the binary directly.

There appears to be a private launchd API (see launch_priv.h in launchd source) ‘spawn_via_launchd’ that allows the calling process to request launchd to spawn a process. This API allows feedback about the created process via an ‘observer port’. Looking at the diff of launchd between 10.6.5 and 10.6.6, you can see Apple fixed a bug in their code to make sure that the right exit status is captured by launchd and then forwarded to the original process via that observer port.

What appears to happen is that when an application is launched via LaunchServices, LaunchApplicationViaLaunchD calls ‘spawn_via_launchd’, and passes the observer port along via NotifyServerSideAboutLaunchedApplication. I think this then passes the observer port along to coreservicesd. I’m guessing coreservicesd is the one that checks the exit code, but I can’t be sure."

2
Kynth On

It certainly exists within iOS - I've seen com.apple.launchd scrolling past in console/log (normally when I've broken something!).

Keep an eye out for when the native apps (UIKitApplication) are started up at boot such as com.apple.mobilemail and com.apple.mobilephone.

I'm not aware of being able to use it outside of the native arena though, I don't see any documented API's for it. I've always assumed it was simply out of bounds for us mere mortals when it came to iOS rather than OSX.