Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 1, 2011
  1. @ksuther
Commits on May 10, 2011
  1. @andymatuschak

    Cleaned up SUUpdater.h

    andymatuschak authored
Commits on May 2, 2011
  1. @uliwitness
  2. @uliwitness

    Sparkle now warns the delegate before and after it brings up a modal …

    uliwitness authored
    …panel. One can e.g. use this to unfloat floating windows that would otherwise cover the alerts.
Commits on Dec 8, 2009
  1. Delegate can now control how version numbers are formatted/displayed …

    Uli Kusterer authored
    …to the user, so we can e.g. exclude build numbers or whatever makes sense for a particular application.
Commits on Dec 4, 2009
  1. @uliwitness

    Merge of changes from SVN repository:

    uliwitness authored
    - Changed NTSynchronousTask to also give the status return value and direct stderror output to the outputData.
    - Changed includes so this builds as part of an app, too, not just as a framework
    - Made sure SUAppcast's dealloc releases some leaked ivars.
    - Added infoURL, extracted from link, that can point to a "more Info" page for download-less URLs
    - Added support for version attribute on item so we can support update notifications that don't include an enclosure (e.g. paid upgrades, or upgrades that would require a system update)
    - Added/improved a few description methods to ease debugging.
    - Added SULog so one can ask for a special log with additional information when there are update issues.
    - Added mayUpdateAndRestart for apps that absolutely, positively can't restart right now (e.g. cuz they're burning a CD and would produce a coaster).
    - Added updaterWillRelaunchApplication delegate method, analogous to the notification. Useful to have app delegate quit helper apps during installation.
    - Made SUBasicUpdateDriver's abortUpdate implicitly retain/autorelease the update driver, because the notification center otherwise releases it and it goes away, causing crashes in superclass's abortUpdate.
    - Merge of SUKeepDownloadOnFailedInstallKey and SUFixedHTMLDisplaySizeKey.
    - Avoid a few warnings about missing prototypes
    - Be paranoid, hdiutil can verify the download again, so let it. Better for internal apps where we turn off DSA checks, too.
    - SUHost has an -installationPath now, independent from the bundlePath, so one can normalize the app name from "MyApp 1.1b4" back to "MyApp" Users assume the file name contains the correct version number when there is one in it. Saves support a few round-trips each time.
    - Be better at threading: Try calling non-thread-safe methods on main thread only, and don't assume delegates know when they need to be thread-safe, call them on main thread where possible.
    - Added a method to put the old copy of the app in the trash. 1.5git changed in this spot, so I didn't actually merge the code that uses it back in yet.
    - Fix version comparison so it doesn't get confused by bracketed build numbers in version strings
    - Make sure cancel button is disabled during extraction, otherwise user would crash.
    - Don't put auto-update window at floating window level. It's huge and can't be switched to background! If you're an NSBGOnly where you need that, turn it on only in that case, but don't generally do such nonsense.
    - Hide release notes view if there aren't any.
    - Test whether we are on dial-up before checking for updates in background. It's not nice to cause (possibly expensive) dial-up periodically.
    - Temporarily comment out DSA complaints for easier testing.
    - Don't store (possibly already invalidated) one-shot NSTimers in an ivar. It's bad style. Retain it instead.
    - Decompress some monster expressions with nested method calls in ternary operators and nested in method calls again.
    - Don't use implicit "id" for params or return types.
    - finish_installation now puts up a progress window, so user knows update is still not finished.
    - Use ThreadSafePreferences (included dummy version that uses regular prefs for projects that don't use ThreadSafePreferences).
    - Todo later: Change finish_installation to be prettier.
Commits on Nov 1, 2009
  1. performed a code review, specifically:

    Sean McBride authored
    - changed some #include to #import
    - fixed some NULL -> nil Cocoa coding conventions
    - added new compiler warnings and fixed some warnings they generated
    - check for nil from NSTemporaryDirectory
    - added missing files to unit test and test app targets
    - added xcconfig files for unit test target
    - added @private to some ivars
    - changes some variables from signed to unsigned as appropriate
    - changed from base 2 to base 10 measurements of file size, consistent with both the actual meaning of metric prefixes and Apple's new policy as of 10.6
    - reduced some unneeded copy-paste of code
    - fixed failure to check for null from malloc and unneeded check against null before calling free
    - OSErr was incorrectly used instead of OSStatus
    - added some consts & statics to global strings
    - fixed some issues discovered by static analysis
    - fixed some 64bit issues, mostly related to casting and the use of slightly incorrect types/sizes
    - some dealloc methods were using accessors, changed to access ivars directly, as per Apple guidelines
    - removed old NS_DURING, NS_HANDLER, NS_ENDHANDLER macros
    - fixed a bug where immutable data was being mutated
    - removed all instance of "== YES" as they are dangerous
    - removed some redundant nil checks
    - fixed some leaks
    - conditionally replaced deprecated method usage
    - cleanup CF/NSMakeCollectable usage
    - fixed bug in GC where memory could be collected too early due to lack of strong references when using UTF8String
    - prevent passing null to CFRelease
Commits on Aug 21, 2009
  1. Provide the ability to set a custom user agent string on all HTTP req…

    Mark Rowe authored
    …uests that Sparkle initiates.
Commits on Jan 6, 2009
  1. @andymatuschak
Commits on Aug 18, 2008
  1. Provide getter for SULastCheckTimeKey

    Peter Speck authored
Commits on Aug 17, 2008
  1. @andymatuschak

    Fixes 258547

    andymatuschak authored
    SUUpdater now implements two new keys: "automaticallyDownloadsUpdates" and "sendsSystemProfile".
    Here's the current state of the setting keys, as documented by Christiaan Hofman:
    * UserDefaults through SUUpdater accessors with default value in Info.plist:
    * Info.plist only (app settings):
    * UserDefaults only (private persistent state):
    This revision also corrects a compilation error from r285.
Commits on Aug 11, 2008
  1. @andymatuschak

    Fixes 251968

    andymatuschak authored
    Sparkle now requires custom feed parameters to include a "displayKey" and "displayVersion" key. These will be displayed to the user in the initial permission dialog so that he knows what he's getting.
Commits on Jul 31, 2008
  1. @andymatuschak

    Fixes 253187

    andymatuschak authored
    Added a delegate method called pathToRelaunchForUpdater: which can be used for plugins to provide the path which should be used when relaunching the client after installing an update.
Commits on Jul 25, 2008
  1. @andymatuschak

    The Sparkle preference keys are now declared private / deprecated / a…

    andymatuschak authored
    …llowed to change without me receiving hate email. However! SUUpdater is now KVC-compliant for:
Commits on Jul 24, 2008
  1. @andymatuschak

    Fixes 243884

    andymatuschak authored
    Made Sparkle.h no longer a massive multi-headed abomination: now only SUAppcastItem, SUAppcast and SUUpdater (and SUVersionComparisonProtocol because it's part of the delegate protocol) are public.
    This means there's no longer a public SUProbingUpdateDriver or a checkForUpdatesWithDriver: method. Now use checkForUpdateInformation. I may change that API before release, though. I'm thinking it might be better to give the delegate the opportunity to reject a potential update instead: then you'd just call checkForUpdatesInBackground and override that delegate method to always return NO. We'll see.
  2. @andymatuschak

    Fixes 245991

    andymatuschak authored
    Changed updatePreferencesChanged to resetUpdateCycle to give better semantics for bundle-ish apps which need to start the update cycle manually since applicationDidFinishLaunching: won't do the right thing.
Commits on Jul 17, 2008
  1. @andymatuschak

    Fixes 244857

    andymatuschak authored
    Made a first crack at redifining the SUUpdater delegate protocol. Still not sure about a couple things, so please don't change your delegate methods to conform until this gets merged into trunk.
    Also made the SUUpdateDrivers not have the updater's delegate as their delegate (that was really icky). Now they're just coupled with the SUUpdater, which is icky as well, but less icky, at least.
Commits on Jul 16, 2008
  1. @andymatuschak

    Beginnings of insane SUHost-based refactoring to get rid of NSBundle+…

    andymatuschak authored
    …Sparkle. More super-unstable refactorings to come...
Commits on Jul 3, 2008
  1. @andymatuschak

    Fixed 244761

    andymatuschak authored
    Added a delegate method:
    - (id <SUVersionComparison>)versionComparatorForHostBundle:(NSBundle *)hb;
    Override this to specify a custom SUVersionComparison implementor to be used.
Commits on Jul 1, 2008
  1. @andymatuschak
Commits on Jun 29, 2008
  1. @andymatuschak

    Improved delegate names and made SUProbingUpdateDriver use SUUpdater'…

    andymatuschak authored
    …s delegate methods instead of dumbly having its own.
  2. @andymatuschak

    Fixed 236240

    andymatuschak authored
    Sparkle now detects if the preferences for automatic update checks or the time interval change mid-cycle.
    If your product is a, you need to clue Sparkle in on the change by calling [[SUUpdater sharedUpdater] updatePreferencesChanged]. Sadly, there's no way to use NSUserDefaultsController to get to preferences which aren't managed by the host app.
  3. @andymatuschak

    Fixes 236577

    andymatuschak authored
    SUUpdater.h should be able to be included independently of other headers now.
Commits on Jun 26, 2008
  1. @andymatuschak
Commits on Jun 21, 2008
  1. @andymatuschak
Commits on May 31, 2008
  1. @andymatuschak

    Fixes bug 228446

    andymatuschak authored
    Finally adding real delegate support. The following methods are implemented; the comments document them.
    If you have suggestions for other methods that would be useful, feel free to suggest them.
    // Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
    - (BOOL)shouldPromptForPermissionToCheckForUpdates;
    // Implement this if you want to do some special handling with the appcast once it finishes loading.
    - (void)appcastDidFinishLoading:(SUAppcast *)appcast;
    // If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
    // a valid update, if any, in the given appcast.
    - (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast;
    // Sent when a valid update is found by the update driver.
    - (void)didFindValidUpdate:(SUAppcastItem *)update;
    // Sent when the user makes a choice in the update alert dialog (install now / remind me later / skip this version).
    - (void)userChoseAction:(SUUpdateAlertChoice)action forUpdate:(SUAppcastItem *)update;
    // Sent immediately before installing the specified update.
    - (void)updateWillInstall:(SUAppcastItem *)update;
    // Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
    - (BOOL)shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
    // Called immediately before relaunching.
    - (void)updaterWillRelaunchApplication;
  2. @andymatuschak

    Removed the checkInterval IV and factored out its assignment to a che…

    andymatuschak authored
    …ckInterval method in SUUpdater. Now when future updates are scheduled after an initial one exits, they'll use the current interval.
Commits on May 8, 2008
  1. Touched practically every line of code in a super-monster-awesome ref…

    andym authored
    …actoring. Please read:
    - Broke out SUUpdater functionality into update drivers. There's a basic one from which everything else inherits, then a user-initiated one, an automatic one, and a scheduled one. It's super-clean-and-shiny.
    - Destroyed the abomination that was SUStatusChecker. In its place is SUProbingUpdateDriver, which is like 10 lines long.
    - Made automatic installation less stupid. It used to install, THEN offer to relaunch. That's dumb, beacuse if the user says no, the app is running from the trash. Now it offers to install and relaunch or to install on quit.
    - Renamed like every method and symbol. I hope you didn't branch anything.
    - Reorganized the project hierarchy to be much clearer and easier to navigate.
    - Reworked the error system to no use NSError instead of exceptions; extra technical information is now logged to the console so that we can find problems.
    - A bunch of other small bugfixes in things I noticed along the way but no longer remember.
    - Probably a ton of other stuff.
    Read over the code and see what I've done. Then PLEASE test this with your app internally and let me know how it goes. This revision is hereby NOT YET DECLARED SAFE FOR PUBLIC RELEASE. But because I'm still using SVN, this is how things have to be.
Commits on Apr 15, 2008
  1. Major refactoring, yay.

    andym authored
    Moved out installation phase to separate classes, separating packages and flat-file installs.
    Made the DMG cleanup less horrifying.
    All-around prettification.
    This may or may not break the world; please let me know.
Commits on Jan 24, 2008
  1. Made a good deal more progress integrating the profile checking featu…

    andym authored
    …res. It should actually work now.
    Interface for asking the user if they will allow the profile to be sent is forthcoming.
    I also added some debug options to the test app's window; these may come in handy.
Commits on Jan 17, 2008
Commits on Dec 30, 2007
  1. Fixed warnings for missing newlines at the end of the file.

    andym authored
    Replaced use of SystemVersion.plist with Gestalt()
Commits on Dec 25, 2007
  1. Improved headers from Charles D. H. Williams.

    andym authored
Commits on Dec 24, 2007
  1. Fixed up headers to make things easier for those who compile Sparkle …

    andym authored
    …in situ -- thanks for the help, Charles D. H. Williams.
Commits on Dec 22, 2007
Something went wrong with that request. Please try again.