So, it looks like one can call SMJobCopyDictionary with kSMDomainSystemLaunchd and, in the case of the SMJobBless sample code, com.apple.bsd.SMJobBlessHelper to determine whether or not the helper tool has been installed.
What I am still not sure about is how to check the version number of the tool to see if I need to call SMJobBless again to update the helper tool. I suppose I could encode the version in the label of the tool. So, in the case of the SMJobBless code, one might have: com.apple.bsd.SMJobBlessHelper.3 or something, but I'm guessing there is a better solution then this. On Sep 30, 2011, at 1:53 PM, Eric Gorr wrote: > That's interesting. > > So, how would one go about checking to see whether or not SMJobBless needed > to be called? > > I suppose one would need to check the version number of the installed job vs. > the one in the application package. > > I also suppose one would also try to connect with the helper tool and, if > that fails, then call SMJobBless. > > > > On Sep 30, 2011, at 1:40 PM, Kyle Sluder wrote: > >> On Sep 30, 2011, at 10:05 AM, Eric Gorr <mail...@ericgorr.net> wrote: >> >>> On Sep 30, 2011, at 1:00 PM, Jean-Daniel Dupas wrote: >>> >>>> As I understand it, you have to bless the job only once, not at each >>>> launch, so you shouldn't have to request the authorization each time. >>> >>> It would be interesting if that is how it actually works, but I am quite >>> certain it doesn't work that way. >> >> It does. SMJobBless submits a blessed plist to launchd. It does not do >> one-off jobs. You use once it to install a privileged launchd task that you >> can talk to in the future. >> >> --Kyle Sluder > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/mailist%40ericgorr.net > > This email sent to mail...@ericgorr.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com