Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6676191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:57:22+00:00 2026-05-26T03:57:22+00:00

I cannot seem to locate any documentation on this, so hopefully someone can confirm

  • 0

I cannot seem to locate any documentation on this, so hopefully someone can confirm the behavior I am seeing with Apple’s sample SMJobBless code.

I was under the impression that it would only ask for an admin password if it detected a that a new version of the helper tool needed to be installed.

However, this impression is apparently incorrect.

The behavior I am seeing under 10.6 is that if I launch the app for the first time, it will ask for the password. If I launch almost immediately, it won’t. However, if I wait a long enough time, it will ask for the password again. During all of this, the helper tool does not change.

Can anyone point to documentation that defines this as the correct behavior?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:57:23+00:00Added an answer on May 26, 2026 at 3:57 am

    If anyone is interested, this (probably) turned out to be a bug and one has been filed. rdar://10280469

    The way the system currently works is that it will ask for an admin password every time regardless of whether or not the SMJobBless function needs to install the helper tool or not. The bug is (probably) that a admin password request should not be made if the helper tool does not need to be installed (for example, it is already installed and has the same version as the one in the app bundle).

    So, what this means is that the determination of whether or not the helper tool needs to be installed needs to be made before a call to SMJobBless and SMJobBless should only be called if it is already known the helper tool needs to be installed.

    In my case, I only need to check whether the tool is installed (SMJobCopyDictionary handles this) and, if the tool is installed, whether or not it’s version is older then the version of the tool in my app bundle.

    Some (incomplete) code to check whether the tool is installed and what the versions are is below.

    There is another alternative to do a version check of the helper tool which is for the helper tool to receive a request for it’s version and for it to send a version reply back. Personally, I like the method below, but wanted to mention this alternative as it may be the best path in some situations.

    NSDictionary* installedHelperJobData;
    
    installedHelperJobData  = (NSDictionary*)SMJobCopyDictionary( kSMDomainSystemLaunchd, (CFStringRef)@"com.apple.bsd.SMJobBlessHelper" );
    
    NSString*       installedPath           = [[installedHelperJobData objectForKey:@"ProgramArguments"] objectAtIndex:0];
    NSURL*          installedPathURL        = [NSURL fileURLWithPath:installedPath];
    
    NSDictionary*   installedInfoPlist      = (NSDictionary*)CFBundleCopyInfoDictionaryForURL( (CFURLRef)installedPathURL );
    NSString*       installedBundleVersion  = [installedInfoPlist objectForKey:@"CFBundleVersion"];
    NSInteger       installedVersion        = [installedBundleVersion integerValue];
    
    NSLog( @"installedVersion: %ld", (long)installedVersion );
    
    NSBundle*       appBundle       = [NSBundle mainBundle];
    NSURL*          appBundleURL    = [appBundle bundleURL];
    
    NSURL*          currentHelperToolURL    = [appBundleURL URLByAppendingPathComponent:@"Contents/Library/LaunchServices/com.apple.bsd.SMJobBlessHelper"];
    NSDictionary*   currentInfoPlist        = (NSDictionary*)CFBundleCopyInfoDictionaryForURL( (CFURLRef)currentHelperToolURL );
    NSString*       currentBundleVersion    = [currentInfoPlist objectForKey:@"CFBundleVersion"];
    NSInteger       currentVersion          = [currentBundleVersion integerValue];
    
    NSLog( @"currentVersion: %ld", (long)currentVersion );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i cannot seem to find the answer to this. i uploaded code to pastebin
I cannot seem to get this date picker working at all. I know it
I cannot seem to get the quotes around this statement right. No matter what
I cannot seem to find the answer to this I am looking for a
I cannot seem to figure out where I went wrong with this. favorite share
I cannot seem to figure out what is making this script go wrong... You
Cannot seem to loop through the XElement and build a datatable. My XElement will
I cannot seem to get user entered data into a table and then printed.
I cannot seem to figure out I am getting the following error in IE
I cannot seem to write to a file. I create the file and directory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.