Skip to content

feat(updates): auto-update with Sparkle - #4

Merged
fabiomsnunes merged 5 commits into
feat/auto-updatefrom
feat/sparkle
Nov 17, 2026
Merged

fabiomsnunes merged 5 commits into
feat/auto-updatefrom
feat/sparkle

Conversation

@fabiomsnunes

Copy link
Copy Markdown
Owner

Replaces #3 (closed when its base branch was deleted). Adds a release guard: the build number must go up.

  • Sparkle 2.10.1 via SPM, Check for Updates… in the menu bar menu. SUFeedURL = releases/latest/download/appcast.xml, SUPublicEDKey in Support/WindowLatch-Info.plist (merged with the generated Info.plist).
  • scripts/make-appcast.sh writes a one-item appcast signed with SPARKLE_ED_PRIVATE_KEY; the release workflow downloads the Sparkle tools (pinned by SHA-256) and publishes appcast.xml next to the .dmg. It fails if the tag does not match MARKETING_VERSION.
  • sign-app.sh: signs Sparkle's Autoupdate helper too, and drops the hardened runtime: with a self-signed certificate (no Team ID), library validation refused Sparkle.framework and the app crashed at launch.
  • AX reads now log their error code.
  • README: size (~2 MB), update check disclosure in the FAQ, release steps, and the one-time Accessibility reset when coming from 1.0.2.

Tested locally end to end (feed served from 127.0.0.1): 1.1.2 installed from a quarantined .dmg (Open Anyway once), Accessibility granted, window moved; Check for Updates → 1.1.3 downloaded, EdDSA verified, installed and relaunched with no Gatekeeper prompt and no quarantine on the new app; windows moved right after the relaunch without granting again.

Found along the way: coming from 1.0.2 the stale ad-hoc entry stays on and AXIsProcessTrusted returns true while every AX call fails with -25211. Documented in the README (reset once).

Add Sparkle 2 with a 'Check for Updates…' menu item. The release
workflow signs the .dmg with the EdDSA key (SPARKLE_ED_PRIVATE_KEY) and
publishes a one-item appcast.xml next to it, so SUFeedURL can point at
releases/latest/download/appcast.xml. sign-app.sh now also signs the
Autoupdate helper, which has no bundle extension.
The hardened runtime turns on library validation, which only loads
frameworks signed with the app's Apple Team ID. The self-signed
certificate has no Team ID, so dyld refused the embedded Sparkle
framework and the app died at launch. The hardened runtime is only
needed for notarisation, which these builds skip.
…ot be read

A failed read logged only 'No focused window', which hid whether the
cause was a missing grant (-25211) or an app that does not publish its
windows.
… from 1.0.2

Tested 1.0.2 -> 1.1: the old ad-hoc entry stays in the list switched on,
AXIsProcessTrusted reports true, but every AX read fails with -25211, so
onboarding never shows and shortcuts do nothing until the entry is reset.
Sparkle compares CFBundleVersion, so a release that bumps only
MARKETING_VERSION is never offered to anyone. Compare against the
published appcast and fail the release instead.
@fabiomsnunes
fabiomsnunes merged commit e54bc73 into feat/auto-update Nov 17, 2026
1 of 4 checks passed
@fabiomsnunes
fabiomsnunes deleted the feat/sparkle branch November 17, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant