radj
radj

Reputation: 4377

Is there a way to load a LaunchAgent plist programmatically?

I am looking for an alternative way asides using NSTask/system() to run "launchctl load (plist)". Is there an API for this? Something like CFLaunchdHelper or NSLaunchd. I tried searching but didn't find any and TN2083 doesn't have any info about this.

Upvotes: 4

Views: 814

Answers (1)

fbernardo
fbernardo

Reputation: 10104

Have a look at /usr/include/launch.h. A quick search revealed this link, seems useful.

Upvotes: 3

Related Questions