Black Friday is here: Premium €5, Featured €10, Sponsor half price, until Mon, Nov 30. See the offer
Back to blog
GuidemacOSDistribution

Sparkle Updates for Mac Apps: How Auto-Update Works Outside the App Store

How to ship automatic updates for a Mac app you distribute yourself: what Sparkle is, how the appcast and signatures work, and the mistakes that break updates for your users.

ET

Editorial team

· 3 min read

Key takeaways

  • Apps from the Mac App Store update through the store. An app you distribute yourself has to update itself, and Sparkle is the framework most Mac developers use for that.
  • Sparkle reads a small feed file (the appcast) that lists versions, download links and signatures, and offers the update inside your app.
  • Updates are signed with a key that only you hold, so users never install a build that didn't come from you.
  • Test the whole update path from an old build before every release: most broken updates come from a wrong version number or a missing signature.

When you sell or give away a Mac app from your own website, nobody updates it for you. There's no store pushing a new version to your users, so if you don't build an update path, people stay on version 1.0 until they happen to visit your site again.

The standard answer is Sparkle, an open source framework that most independent Mac apps use. This guide explains what it does and what to get right.

How Sparkle works

Sparkle adds an updater to your app. On a schedule you choose, it downloads a small feed from your server, compares the version listed there with the one that's installed and, if there's a newer one, shows the user an update window with release notes. One click and Sparkle downloads, verifies and installs the new version, then relaunches the app.

Three pieces make this work:

  • The framework inside your app, which does the checking and installing.
  • The appcast, an XML file on your website with one entry per release.
  • A signing key that proves an update comes from you.

The appcast

Each entry in the appcast describes one release: its version number, the release notes, the URL of the download and its size. You can write it by hand for a small project, but Sparkle ships a tool that builds the file from a folder of release archives, so most developers generate it as part of their release script.

Host it somewhere stable over HTTPS. If the address changes, apps that are already installed can't find their updates, so treat that URL as permanent from the first release.

Signing updates

Sparkle uses its own signature in addition to Apple's code signing. You generate a key pair once. The public key goes inside your app, and you sign each release archive with the private key. When the app downloads an update, it checks the signature against the public key and refuses anything that doesn't match.

Two rules follow from that:

  • Back up the private key somewhere safe. If you lose it, you can't ship updates that existing installs will accept.
  • Never commit it to a public repository.

Sign and notarize every release

An update is a new build of your app, so it goes through the same steps as your first release: sign it with your Developer ID certificate and notarize it with Apple. Our guide on notarizing a Mac app covers the process. If you skip it for an update, users get the same Gatekeeper warning you worked to avoid on day one.

Mistakes that break updates

  • Version numbers that don't increase. Sparkle compares the build number, so each release needs a higher one than the last, even for a small fix.
  • A missing or wrong signature. The update downloads, then fails the check and the user sees an error.
  • A changed appcast URL. Old installs can't reach the new location.
  • Only testing a fresh install. The path that matters is an old build updating to the new one. Keep a copy of your previous release and update from it before you publish.

Make updates feel good

A few small choices help users trust the process:

  • Write release notes in plain language: what changed and why they should care.
  • Let people check for updates from the app menu, not only on a timer.
  • Don't interrupt people in the middle of work. Automatic checks that only notify are enough for most apps.

Where this fits

If you're deciding between the App Store and your own site, the update story is one of the trade-offs. We compare both routes in Mac App Store vs direct distribution. If you've picked direct, set up Sparkle before your first public release, not after, so every user who downloads your app gets future fixes.

Questions, answered.

Something else? Ask us.

What is Sparkle?

An open source update framework for macOS apps. You add it to your app, publish an appcast feed on your website, and Sparkle checks it, downloads new versions and installs them.

Do I need Sparkle for a Mac App Store app?

No. The App Store delivers updates itself, and apps that update themselves are not allowed there. Sparkle is for apps you distribute directly from your website.

What is an appcast?

An XML feed hosted on your server. Each entry has a version number, release notes, the download URL, the file size and a signature. Sparkle compares it with the version that's installed.

Do updates need to be notarized?

Yes. The new version you ship should be signed with your Developer ID and notarized like the first one, otherwise Gatekeeper warns users when it launches.

ET

Written by Editorial team

We install, use and write about indie Mac & iOS apps.

Get your app reviewed

Read more