Delta Updates

Sparkle supports “delta updates” for your application: when possible, users can download only the bits that have changed. These updates can be much smaller to download and faster to install.

For each new version you release, you can provide a list of .delta files in addition to the “full” archive of the version. Each .delta contains the information necessary to upgrade from a single older version.

If the user is running a version of the app for which you haven’t provided a .delta, or if the patch doesn’t apply cleanly, they’ll use the non-delta “full” update.

New delta patches must be created using generate_appcast or BinaryDelta from a Sparkle 1.27.0 or later distribution. Note that newly generated patches are still compatible and can be patched from applications using versions of Sparkle framework older than 1.27.0.

Automated generation

The ./bin/generate_appcast tool that comes with Sparkle automatically generates and signs delta updates.

Manual generation

To generate a .delta, you use the BinaryDelta tool included with Sparkle like this:

BinaryDelta create path/to/old/ path/to/new/

To verify that your generated patch applies correctly:

BinaryDelta apply path/to/old/ path/to/patched/

Sign each .delta file and add an enclosure to your appcast’s <item> in <sparkle:deltas> for each .delta file:

   <title>Version 2.0 </title>
   <description>foo bar baz</description>
   <pubDate>Wed, 09 Jan 2006 19:20:11 +0000</pubDate>
   <enclosure url=""
              sparkle:edSignature="..." />
       <enclosure url=""
                  sparkle:edSignature="..." />
       <enclosure url=""
                  sparkle:edSignature="..." />

Tips for Improving Download Size & Performance

We recommend reading Apple’s article on reducing the download size for iOS app updates, which is applicable here too. To reword:

  • Do not make unnecessary modifications to files. Compare the contents of the prior and new versions of your app and verify that you’ve only changed what you expect within your app bundle. Running BinaryDelta --verbose will show a diff of what has changed.
  • Content that you expect to change in an update should be stored in separate files from content that you don’t expect to change. This reduces the size of the delta update and increases its install speed.
  • Avoid renaming files or folders.