Updating a prefpane from a helper app

Asked by Zach Paine

I'm trying to update a prefpane from a command line tool within the prefPane bundle's Resources directory. I've constructed the correct path to the prefpane bundle and am passing that bundle to [SUUpdater updaterForBundle]. I then call checkForUpdatesInBackground, but I'm not prompted to upgrade. I also have Sparkle integrated into the prefpane itself, and this works fine. Is there something else I need to do?

My code looks like this:

  NSArray *bundlePathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
  NSRange bundlePathRange;
  bundlePathRange.location = 0;
  bundlePathRange.length = [bundlePathComponents count] - 2;
  NSString *bundlePath = [NSString pathWithComponents:[bundlePathComponents subarrayWithRange:bundlePathRange]];
  NSLog(@"Creating updater for bundle %@", bundlePath);
  SUUpdater *updater = [SUUpdater updaterForBundle:[NSBundle bundleWithPath:bundlePath]];
  [updater checkForUpdatesInBackground];

Question information

Language:
English Edit question
Status:
Answered
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Check the console: there may be some informative error, and since it's in the background, Sparkle will fail silently.

Revision history for this message
Zach Paine (zach-paine) said :
#2

I don't see anything in Console.app (looking in system.log). I added
some logging in my app to make sure that the method is actually being
called, and also logged the output of updateInProgress:, which
indicates that there is an fact and update in progress. However, I'm
not prompted to install an update.

-Zach

On Jun 14, 2009, at 11:49 PM, Andy Matuschak wrote:

> Your question #74215 on Sparkle changed:
> https://answers.edge.launchpad.net/sparkle/+question/74215
>
> Status: Open => Needs information
>
> Andy Matuschak requested for more information:
> Check the console: there may be some informative error, and since it's
> in the background, Sparkle will fail silently.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.edge.launchpad.net/sparkle/+question/74215
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

Please send a copy of your app and any materials required to test it to <email address hidden>

Can you help with this problem?

Provide an answer of your own, or ask Zach Paine for more information if necessary.

To post a message you must log in.