Per, The method I use is to get the version number of the installed tool and compare it against the version in the app bundle. Since we know that SMJobBless installs the helper executable in /Library/PrivilegedHelperTools, you can create the URL to /Library/PrivilegedHelperTools/com.yourdomain.yourapp.helper and use NSBundle's + bundleWithURL: method and then call - infoDictionary (or similarly use CFBundleCopyInfoDictionaryForURL) to get the helper tool's info dict. You can then query the dictionary for its version, and decide whether to prompt for blessing rights. HTH, Richard On Mon, Nov 15, 2010 at 10:00, <launchd-dev-request@lists.macosforge.org> wrote:
From: Per Ejeklint <ejeklint@me.com> To: launchd-dev@lists.macosforge.org Date: Mon, 15 Nov 2010 11:21:07 +0100 Subject: [launchd-dev] Not calling SMJobBless if not needed? This is slightly off-topic I guess but the expertise is definitely on this list. :)
I'm using SMJobBless to install and update a launchd daemon from my app and it works like a charm. Only thing is that the user must authenticate at every launch of the app and not just when the provided daemon is actually newer than the running one. Is there a way work around this with ServiceManagement framework? Or another simple way? I'm new to this part of Mac OS X stuff, so I apologize if I'm posting to the wrong list.
/Per