Sparkle framework: auto updates for macOS apps
Sparkle is the open source framework most Mac apps sold outside the App Store use to update themselves. Here's the full setup for Sparkle 2, what goes in the appcast, the mistakes that make updates fail silently, and how to send updates only to licensed customers.
Sparkle is an open source framework that lets a macOS app update itself. Your app reads a small XML file on your server called an appcast, sees that there's a newer version, downloads it, checks its signature, and installs it. The Mac App Store does this for apps sold there. For an app you sell from your own website, Sparkle is the standard way to do it.
The current line is Sparkle 2. The latest release when this page was written was 2.10.1, published on October 25, 2026, and it runs on macOS 12 or later. Everything below follows Sparkle's own documentation as it stood on November 19, 2026.
What you need before you start
- An app distributed outside the Mac App Store. App Store builds are updated by the App Store, so leave Sparkle out of that target.
- A Developer ID signature and notarization. Sparkle's documentation recommends both, and macOS won't open the downloaded app without them. The page on the "app is damaged" message covers how to check a build.
- Somewhere to host files over HTTPS. Sparkle needs only static files: the appcast and your update archives.
- A version number that goes up. Sparkle compares
CFBundleVersion, so it has to increase with every release.
1. Add Sparkle to your project
In Xcode, choose File, then Add Packages, and enter the repository URL:
https://github.com/sparkle-project/Sparkle
That's the Swift Package Manager route, and it's the simplest. Sparkle's command-line tools (generate_keys, generate_appcast and sign_update) come with the package: right-click the Sparkle package in Xcode's project navigator, show it in Finder, and look in artifacts/sparkle/Sparkle/bin/. They're also in the release archive on GitHub.
2. Create the updater
In an AppKit app with a MainMenu.xib, you add an object of class SPUStandardUpdaterController and connect a "Check for Updates…" menu item to its checkForUpdates: action. No code is needed.
In SwiftUI you create the controller yourself:
import SwiftUI
import Sparkle
@main
struct MyApp: App {
private let updaterController = SPUStandardUpdaterController(
startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil
)
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(after: .appInfo) {
Button("Check for Updates…") {
updaterController.updater.checkForUpdates()
}
}
}
}
}
Sparkle's documentation has a longer version that also disables the menu item while a check is already running. Once the controller exists, Sparkle schedules its own checks. You don't call anything on a timer.
3. Generate your signing keys
Sparkle signs every update with an EdDSA (Ed25519) key so that your installed app can tell an update really came from you. Run this once:
./bin/generate_keys
It does two things. It creates a private key and stores it in your Mac's login Keychain, and it prints the public key, a short base64 string. The public key goes into your app. The private key signs each update and never ships.
Back the private key up. ./bin/generate_keys -x private-key-file exports it and -f private-key-file imports it on another Mac. If you do lose it, Sparkle has a way out for apps that are also signed with a Developer ID certificate: you can publish one update that changes the EdDSA key while keeping the same Apple signature, or the other way round, but not both at once.
4. Configure Info.plist
Two keys are required:
<key>SUFeedURL</key>
<string>https://updates.myapp.com/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>pfIShU4dEXqPd5ObYNfDBiQWcXozk7estwzTnF9BamQ=</string>
The feed URL is compiled into every copy of your app you ever ship, so use a domain you control. If you move hosting later, you change a DNS record and every installed copy follows.
The settings most apps touch:
| Key | Default | What it does |
|---|---|---|
SUEnableAutomaticChecks |
Not set | When it's not set, Sparkle asks the user on second launch whether to check automatically. Set it to YES to check without asking |
SUScheduledCheckInterval |
86400 |
Seconds between automatic checks. One day by default, and never less than one hour |
SUAutomaticallyUpdate |
NO |
Set to YES to download and install updates silently in the background by default |
SUAllowsAutomaticUpdates |
Offered to the user | Set to NO to remove the automatic install option entirely |
SUVerifyUpdateBeforeExtraction |
NO |
Checks the signature before the archive is unpacked. Stricter, and needs EdDSA signing |
5. Archive and sign the update
Put your signed, notarized .app in an archive. Sparkle can update from a .dmg, .zip, tarball or installer package, so you can usually reuse the file your customers download. For a zip, use ditto, because it preserves the symlinks that frameworks depend on:
ditto -c -k --sequesterRsrc --keepParent MyApp.app MyApp.zip
Then put the archive in a folder that holds all your releases and run:
./bin/generate_appcast /path/to/your/updates_folder/
generate_appcast reads each archive, signs it with the key from your Keychain, writes the appcast, and also creates .delta files so users on recent versions download only what changed. Upload the archives, the deltas and the appcast to your server.
If you'd rather build the appcast yourself, sign one archive at a time:
./bin/sign_update MyApp.zip
It prints the two attributes to paste into the appcast: sparkle:edSignature="..." and length="...".
What an appcast looks like
An appcast is an RSS feed with extra tags in the sparkle namespace. One <item> per release:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<title>MyApp</title>
<item>
<title>Version 1.5.1</title>
<link>https://myapp.com</link>
<sparkle:version>1248</sparkle:version>
<sparkle:shortVersionString>1.5.1</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>12.0.0</sparkle:minimumSystemVersion>
<sparkle:releaseNotesLink>https://myapp.com/release-notes/1.5.1.html</sparkle:releaseNotesLink>
<pubDate>Thu, 19 Nov 2026 10:00:00 +0000</pubDate>
<enclosure url="https://updates.myapp.com/MyApp-1.5.1.zip"
sparkle:edSignature="7cLALFUHSwvEJWSkV8aMreoBe4fhRa4FncC5NoThKxwThL6FDR7hTiPJh1fo2uagnPogisnQsgFgq6mGkt2RBw=="
length="1623481"
type="application/octet-stream" />
</item>
</channel>
</rss>
The two version tags matter more than anything else in the file:
sparkle:versionis the machine-readable version. Sparkle compares it with the installed app'sCFBundleVersionsparkle:shortVersionStringis the version people see, matchingCFBundleShortVersionString
If your CFBundleVersion is a build counter like 1248 and you put 1.5.1 in sparkle:version, Sparkle compares 1.5.1 with 1248, decides the installed app is newer, and tells every user they're up to date. Nothing is logged as an error. This is the most common reason a correct-looking feed delivers no updates.
What else the appcast can do
| Tag | What it does |
|---|---|
sparkle:minimumSystemVersion |
Offers the update only to Macs on that macOS version or later. Use three parts, like 12.0.0 |
sparkle:channel |
Puts the release on a named channel, such as beta. Only apps that opt in see it |
sparkle:phasedRolloutInterval |
Releases the update to users in seven groups, one group per interval. 86400 rolls out over seven days |
sparkle:criticalUpdate |
Shows the update promptly and removes the option to skip it |
sparkle:minimumAutoupdateVersion |
Marks a major upgrade: older versions always see the update window, even with silent updates on |
sparkle:informationalUpdate |
Shows the release with a link to your website, without installing anything |
sparkle:releaseNotesLink or <description> |
Release notes, linked or embedded as HTML. Plain text and Markdown are supported in newer versions |
Channels need a line of code. A stock Sparkle app ignores every item that carries a channel tag, so beta testers see nothing until your updater delegate allows the channel:
func allowedChannels(for updater: SPUUpdater) -> Set<String> {
return Set(["beta"])
}
What shows in the update window is whatever you put in the release notes, so write them for customers. The release notes templates include one sized for an update dialog.
Sandboxed apps
Sparkle 2 works in sandboxed apps, with two additions. Enable the installer service in Info.plist:
<key>SUEnableInstallerLauncherService</key>
<true/>
And add this exception to your entitlements file:
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spks</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)-spki</string>
</array>
Nothing checks those two strings at build time. A typo compiles, signs and notarizes, and then updates fail only in the release build. If your app doesn't have the outgoing network connections entitlement, Sparkle also has a downloader service you can enable with SUEnableDownloaderService.
Updates only for licensed customers
If you sell your app, you may not want every old copy to receive every new version for ever. The usual cases are a subscription that lapsed, a refund, or a paid upgrade to a new major version.
Sparkle lets the app identify itself on both requests it makes, the appcast and the download, through the updater delegate:
final class UpdateGate: NSObject, SPUUpdaterDelegate {
var licenseKey: String?
func feedParameters(
for updater: SPUUpdater,
sendingSystemProfile sendingProfile: Bool
) -> [[String: String]] {
guard let licenseKey else { return [] }
return [["key": "license_key", "value": licenseKey]]
}
func updater(
_ updater: SPUUpdater,
willDownloadUpdate item: SUAppcastItem,
with request: NSMutableURLRequest
) {
guard let licenseKey else { return }
request.setValue("Bearer \(licenseKey)", forHTTPHeaderField: "Authorization")
}
}
Keep the delegate in a property and pass it as updaterDelegate when you create the controller.
The server side is the harder half. A static appcast can't check anything, so you need a feed that's generated per request, knows your licenses, and decides which versions each customer is entitled to. LicenseSeat provides that feed. You upload each release, it signs the archive on the server, and it serves the appcast for your product:
<key>SUFeedURL</key>
<string>https://licenseseat.com/p/<product-slug>/appcast.xml</string>
<key>SUPublicEDKey</key>
<string><the Ed25519 public key from your dashboard></string>
With the feed set to licensed, a request without a valid license key gets an empty feed, so an unlicensed copy sees "no updates" and not an error, and the version the customer has keeps working. A license whose year of updates has ended is still offered every release published before it ended, and nothing newer. Beta releases are at /p/<product-slug>/appcast/beta.xml.
Because signing happens on the server, there's no private key in your CI and no sign_update step in your build. If your app has already shipped with a SUPublicEDKey, import that key and don't generate a new one, or existing installs will refuse every update.
The guide to shipping desktop updates covers the feed in detail, and the guide to licensing macOS apps covers the license checks inside the app. LicenseSeat charges a flat monthly fee and takes 0% of your revenue.
Test it before your users do
You need two builds: an older one installed, and a newer one in the feed.
- Run the older build, then quit. By default Sparkle doesn't ask about automatic checks until the second launch
- Run it again, and either choose "Check for Updates…" or clear the timer so the automatic check runs now:
defaults delete com.mycompany.myapp SULastCheckTime
- Watch Console.app, filtered to your app. Sparkle logs every step there, and usually says what went wrong
For a sandboxed app, defaults writes to a place the app doesn't read. Its preferences are in ~/Library/Containers/<bundle-id>/Data/Library/Preferences/.
Delta updates need a real older build to test with. Sparkle skips a delta when the installed app doesn't match the version the delta was made from.
Common problems
"You're up to date" when the feed has a newer version. Check sparkle:version against the installed CFBundleVersion, as described above. Then check for a sparkle:channel tag the app doesn't allow, and a sparkle:minimumSystemVersion higher than the Mac's.
"The update is improperly signed." The sparkle:edSignature in the feed doesn't verify against the SUPublicEDKey in the installed app. Either the archive changed after it was signed, or it was signed with a different key. Don't fix this by changing the key in the app: the copies already installed still have the old one.
No update check happens at all. The user may have declined automatic checks, or the last check was less than a day ago. Clear SULastCheckTime or use the menu item.
The app can't update itself. An app run straight from a disk image, or from the Downloads folder with the quarantine flag still on it, runs from a read-only location, and Sparkle's documentation notes that by default the user isn't told. Ship a disk image with an /Applications shortcut so people move the app before opening it.
It works in Xcode and fails in the release build. Usually signing. Build with Product, Archive and export with the Developer ID method so Sparkle's helper tools are signed correctly, and don't add --deep to your code signing flags.
Common questions about Sparkle
Is Sparkle free?
Yes. Sparkle is open source and free to use in commercial apps. You pay only for wherever you host the appcast and the update files.
Does Sparkle work with Mac App Store apps?
No, and it doesn't need to. The App Store updates the apps it sells. Sparkle is for apps you distribute yourself, and if you ship both, keep Sparkle and SUFeedURL out of the App Store build.
Does Sparkle work with SwiftUI?
Yes. Create an SPUStandardUpdaterController in your App struct and add a "Check for Updates…" command that calls the updater. Sparkle's documentation has a complete example.
What is an appcast?
An RSS feed that lists your releases. Each item has a version, a download URL, the file's length and its EdDSA signature. Sparkle reads it to decide whether there's an update.
What happens if I lose my Sparkle private key?
If your app is also signed with a Developer ID certificate, you can rotate: publish an update signed with a new EdDSA key and the same Apple certificate, and Sparkle accepts it. If you lose both at once, existing installs can't be updated.
What is the difference between Sparkle 1 and Sparkle 2?
Sparkle 2 added support for sandboxed apps, custom update interfaces, channels and a more reliable installer. SUUpdater from Sparkle 1 still exists as a deprecated stub, and new apps should use SPUStandardUpdaterController.
Can I use Sparkle on Windows?
Not Sparkle itself. WinSparkle and NetSparkle are separate projects that read the same appcast format on Windows. Sparkle's documentation recommends a separate feed for each platform.
Do I need a server for Sparkle updates?
Only a place to host static files over HTTPS. You need a server that generates the feed only when the answer should depend on who's asking, as with licensed updates.