Sparkle is the standard framework for updating Mac apps that ship outside the App Store. This tutorial adds Sparkle 2 to a SwiftUI app, from the package to the first tested update. Each step shows the manual way and, where it applies, what Amore does for you. For the full picture of signing, notarization, and packaging, see how to distribute a macOS app outside the App Store.
You need:
- an app that you sign with a Developer ID certificate and notarize,
- an HTTPS server for the appcast and the update archives, and
- an incrementing build number (
CFBundleVersion) for every release. Sparkle compares versions with the build number, not with the marketing version.
1. Add the Sparkle package
- In Xcode, choose File › Add Package Dependencies…
- Enter
https://github.com/sparkle-project/Sparkleand add theSparklelibrary to your app target.
In a Package.swift:
.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.10.1"),
Sparkle's command-line tools (generate_keys, sign_update, generate_appcast) come with the package. In Xcode's project navigator, right-click the Sparkle package and choose Show in Finder. The tools are in ../artifacts/sparkle/Sparkle/bin/.
2. Generate your EdDSA keys
Sparkle verifies every update with an EdDSA (ed25519) signature. Generate the key pair once:
./bin/generate_keys
The tool saves the private key in your login keychain and prints the public key. Run it again at any time to print the public key.
The private key signs all future updates, so back it up. If you lose it, you must follow Sparkle's key rotation rules to ship a new one. Do not commit it to your repository.
With Amore: Amore generates the key pair, or imports the one you already have. See Key Management.
3. Add SUFeedURL and SUPublicEDKey to Info.plist
Sparkle needs two Info.plist keys:
<key>SUFeedURL</key>
<string>https://example.com/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>your-base64-public-key</string>
SUFeedURLis the HTTPS URL of your appcast. App Transport Security blocks plain HTTP.SUPublicEDKeyis the public key from step 2.
In new Xcode projects, add them in the target's Info tab.
With Amore: copy both values from the Sparkle settings in Amore.

4. Start the updater in SwiftUI
Create one SPUStandardUpdaterController for the lifetime of the app, and add a "Check for Updates…" menu item. This follows the sample in Sparkle's documentation. The view model disables the menu item while a check is not possible:
import SwiftUI
import Sparkle
final class CheckForUpdatesViewModel: ObservableObject {
@Published var canCheckForUpdates = false
init(updater: SPUUpdater) {
updater.publisher(for: \.canCheckForUpdates)
.assign(to: &$canCheckForUpdates)
}
}
struct CheckForUpdatesView: View {
@ObservedObject private var viewModel: CheckForUpdatesViewModel
private let updater: SPUUpdater
init(updater: SPUUpdater) {
self.updater = updater
self.viewModel = CheckForUpdatesViewModel(updater: updater)
}
var body: some View {
Button("Check for Updates…", action: updater.checkForUpdates)
.disabled(!viewModel.canCheckForUpdates)
}
}
@main
struct MyApp: App {
private let updaterController = SPUStandardUpdaterController(
startingUpdater: true,
updaterDelegate: nil,
userDriverDelegate: nil
)
var body: some Scene {
WindowGroup {
ContentView()
}
.commands {
CommandGroup(after: .appInfo) {
CheckForUpdatesView(updater: updaterController.updater)
}
}
}
}
If you don't use the SwiftUI app lifecycle, create the SPUStandardUpdaterController in your app delegate's (NSApplicationDelegate) init(), as Sparkle's programmatic setup sample does.
By default, Sparkle asks the user for permission to check automatically on the second launch. If the user agrees, Sparkle checks in the background once every 24 hours.
5. Sandboxed apps
Sparkle needs additional setup when your app uses the App Sandbox entitlement. Follow Sparkle Sandboxing. If you don't need the sandbox, you can remove the entitlement to get started.
Every app that you distribute with Developer ID also needs the Hardened Runtime capability for notarization.
6. Build, sign, and notarize the update
Archive the app in Xcode (Product › Archive), then choose Distribute App with the Developer ID method. This also signs Sparkle's helper tools correctly. Notarize the result and package it:
- DMG: add an
/Applicationsshortcut so users copy the app out of the disk image. - ZIP: put only the app inside.
Sparkle can update from DMG, ZIP, tar archives, Apple Archives, and installer packages. If notarization fails, see Notarization Errors.
With Amore: one command archives, signs, notarizes, and builds the DMG. See DMG creation and the CLI.
7. Publish the appcast
The appcast is an RSS feed that tells Sparkle about new versions. Put all your update archives in one folder and run:
./bin/generate_appcast /path/to/updates/
generate_appcast signs each archive with your private key, writes the appcast with the file name from SUFeedURL, and creates delta updates for faster downloads. If an .html file has the same name as an archive, it becomes the release notes. A .md file also works with Sparkle 2.9 or later on macOS 12 or later. Upload the archives, the delta files, and the appcast to your server.
With Amore: amore release signs the update, writes the appcast, and uploads everything. Amore hosts the appcast on HTTPS, or on your own S3 bucket or custom domain.
8. Test the update
- Install an older build of your app. To test quickly, lower the
CFBundleVersionof a development build for one run. - Launch it, quit, and launch it again. Sparkle asks for permission on the second launch.
- Choose "Check for Updates…" in the app menu.
To test an automatic check without waiting 24 hours, clear the last check time before you launch the app:
defaults delete com.example.MyApp SULastCheckTime
Sparkle logs every step. Watch the log while you test:
log stream --predicate 'subsystem == "org.sparkle-project.Sparkle"'
Troubleshooting
The most common first error is this one:
Update Error!
An error occurred in retrieving update information. Please try again later.

Sparkle could not download the appcast: check SUFeedURL, use HTTPS, and in a sandboxed app check network access. For this and every other Sparkle alert, see Sparkle Update Errors.