SUScheduledUpdateDriver enhancement?

Asked by jeffrey.w.lynch

I'm working on my first project that includes Sparkle for updates. The product consists of a launchd daemon, a system preference pane and a LSUIElement user agent application. It turns out that it was easier to write a separate application to manage the update process since I need to use a PKG based installer instead of a "normal app" DMG. I _thought_ everything was working fine when simulating a user click on "check for updates", but then I changed to using the 'checkForUpdatesInBackground' method and things stopped working. I thought it had to do with file permissions, but then I looked at the sources and discovered that the SUScheduledUpdateDriver - (void)didNotFindUpdate method did not call the delegate's updaterDidNotFindUpdate: method. This was causing me trouble because I wanted my updater app to automatically quit if there were no updates.

Anyway, I changed SUScheduledUpdateDriver.m so that - (void)didNotFindUpdate is now implemented:

- (void)didNotFindUpdate
{
 if ([[updater delegate] respondsToSelector:@selector(updaterDidNotFindUpdate:)])
  [[updater delegate] updaterDidNotFindUpdate:updater];
 [self abortUpdate]; // Don't tell the user that no update was found; this was a scheduled update.
}

That solves my problem, but I wonder if it is generally useful to be implemented this way. I thought I throw it out there and see what people think.

Thanks,

- j e f f

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
jeffrey.w.lynch
Solved:
Last query:
Last reply:
Revision history for this message
Hofman (cmhofman) said :
#1

This is Bug #275463, which was fixed more than a year ago.

Revision history for this message
jeffrey.w.lynch (jlynch) said :
#2

So, the Sparkle 1.5 b6 download at <http://sparkle.andymatuschak.org/> is WAY out of date, then. It would have been nice to know that it wasn't the latest and that I should just have built the sources out of github.

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

This was fixed in 3d6f4544. Thanks for writing, though!