Skills

Macos Auto Update

Add Sparkle auto-update support to a native macOS app.

Install

npx skills add fayazara/macos-app-skills --skill macos-auto-update -g -a claude-code -y
Category
Design
Updated
5mo ago
License
See repository
Context cost
Mediumabout 1,639 tokens
Runs scripts
No, instructions only

What it does

Add Sparkle auto-update support to a native macOS app. Use this skill whenever the user wants to add auto-updates, implement Sparkle, set up an appcast feed, add "Check for Updates" to their app, or integrate automatic update checking. Also trigger when the user mentions Sparkle, appcast, SUFeedURL, EdDSA signing, or update notifications. This covers the full setup: adding the Sparkle SPM dependency, creating the UpdaterManager singleton, wiring it into the app delegate and UI, configuring Info.plist, and generating the initial appcast.xml.

Sparkle Auto-Update for macOS Apps

This skill adds Sparkle auto-update support to a native macOS app. Sparkle is the standard open-source framework for macOS app updates outside the Mac App Store.

Overview

The implementation has 4 parts:

  1. SPM dependency -- add the Sparkle package to the Xcode project
  2. UpdaterManager.swift -- a singleton that wraps SPUStandardUpdaterController
  3. Info.plist keys -- SUFeedURL and SUPublicEDKey
  4. UI integration -- "Check for Updates" button in settings/menu bar

Step 1: Add Sparkle via SPM

In Xcode: File > Add Package Dependencies > enter:

https://github.com/sparkle-project/Sparkle

Use the "Up to Next Major Version" rule with 2.0.0. Add the Sparkle framework to your app target.

Or add it to Package.swift if your project uses one:

.package(url: "https://github.com/sparkle-project/Sparkle", from: "2.0.0")

Step 2: Create UpdaterManager.swift

Copy references/UpdaterManager.swift into your project. This is a singleton that:

  • Creates SPUStandardUpdaterController early (before applicationDidFinishLaunching returns)
  • Publishes canCheckForUpdates for UI binding
  • Exposes automaticallyChecksForUpdates toggle
  • Skips all update logic in DEBUG builds (so you don't get update prompts during development)
  • For menu-bar-only apps: temporarily switches to .regular activation policy before showing the update window

The key design decisions in this file:

  • startingUpdater: false in the initializer, then calling start() explicitly in applicationDidFinishLaunching. This gives you control over timing.
  • DEBUG guards on start() and checkForUpdates(). Sparkle should never run in debug builds -- it would try to update your debug app with a release build.
  • ObservableObject with @Published (not @Observable) because we need the Combine publisher(for:) bridge from Sparkle's KVO.
Read the whole SKILL.md on GitHub

More in Design