Sparkle 2 EdDSA Auto-Updates Guide for Native Mac Apps
How to wire Sparkle 2 into a SwiftUI or AppKit app properly — covering SUPublicEDKey, sign_update in GitHub Actions, CFBundleVersion pitfalls, beta feed switching, and zero-downtime rollbacks.
Sparkle 2 is the gold standard for native macOS auto-updates, but a handful of subtle misconfigurations can silently strand users on old versions. The most common culprits are mismatched CFBundleVersion formats, signing the DMG instead of the ZIP, or publishing an unverified EdDSA key.
1. Generate an Ed25519 key pair once and guard the private key
Sparkle 2 replaces legacy DSA signatures with Ed25519 (EdDSA). Run ./bin/generate_keys from the Sparkle release tarball once per app. It stores the private key in your login Keychain and prints the base64 public key for Info.plist. Export the private key string into a CI secret (SPARKLE_PRIVATE_KEY) so GitHub Actions can sign every release headlessly.
<key>SUFeedURL</key>
<string>https://releaseflow.net/kitze/sotto/sparkle/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>YOUR_44_CHAR_BASE64_ED25519_PUBLIC_KEY=</string>
<key>SUEnableAutomaticChecks</key>
<true/>2. Signing release archives in GitHub Actions
Pass the private key via stdin using --ed-key-file - so the secret never touches disk. Upload the resulting .sig file right next to your .zip in the GitHub release — ReleaseFlow automatically reads .sig sidecar files and injects sparkle:edSignature into the generated appcast.
printf '%s' "$SPARKLE_PRIVATE_KEY" | \
./bin/sign_update --ed-key-file - -p dist/MyApp-1.4.18-arm64.zip \
> dist/MyApp-1.4.18-arm64.zip.sig
gh release upload v1.4.18 \
dist/MyApp-1.4.18-arm64.zip \
dist/MyApp-1.4.18-arm64.zip.sig3. CFBundleVersion vs CFBundleShortVersionString
Sparkle never compares your human-facing CFBundleShortVersionString (like "1.4.18") when deciding whether an update is newer. It strictly compares sparkle:version against the running bundle's CFBundleVersion. If your Xcode project sets CFBundleVersion to an integer like 10418 while your appcast emits 1.4.18, Sparkle thinks 10418 > 1.4.18 and users will NEVER see the update.
| Git Tag | SEMVER Strategy | NUMERIC_BUILD Strategy |
|---|---|---|
| v1.4.18 | 1.4.18 | 10418 |
| v1.5.0-beta.2 | 1.5.0b2 | 10500b2 |
| v2.0.0-alpha.1 | 2.0.0a1 | 20000a1 |
4. Supporting beta opt-ins and instant rollbacks
Implement SPUUpdaterDelegate's feedURLString(for:) to append ?channel=beta when the user enables "Receive beta updates" in Settings. Because ReleaseFlow falls back gracefully when no newer beta exists, beta users still receive stable builds automatically.
If a broken release slips past QA, never delete and re-upload an archive under the same version number — users who already updated won't re-fetch it. Either disable the broken release in ReleaseFlow immediately (so un-updated users stay on the last known-good version) and ship a quick patch tag (v1.4.19).
Ship your Mac or Electron app with a single git tag.
Permanent OS-aware download links, cached Sparkle & Electron auto-update feeds, Polar/Stripe PPP checkout, and license keys — with 0% cut on your sales.