Skip to content

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

Closed
fabiomsnunes wants to merge 5 commits into
feat/stable-signingfrom
feat/sparkle
Closed

fabiomsnunes wants to merge 5 commits into
feat/stable-signingfrom
feat/sparkle

Conversation

@fabiomsnunes

Copy link
Copy Markdown
Owner

Stacked on #2.

  • 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).

@wplus-code-review

wplus-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Worth a look (not blocking)

  • WindowLatch.xcodeproj/project.pbxproj: the project is still at MARKETING_VERSION = 1.0.2 / CURRENT_PROJECT_VERSION = 3. Before the first Sparkle release, both must be bumped (the README release steps say so). Otherwise make-appcast.sh will fail the tag check.
  • scripts/make-appcast.sh: the build-number guard uses ((bundle_version <= published_build)). That only works for integer build numbers. Fine with the current CURRENT_PROJECT_VERSION, but a dotted build number would break it.
What was checked
  • PR is open, not a draft, and needs review
  • No CLAUDE.md files exist in the repo, so there was nothing to check for compliance
  • release.yml → make-appcast.sh: argument order, build paths, step order (runs before Publish), and the uploaded appcast.xml path
  • make-appcast.sh: set -euo pipefail behaviour, the tag check, the build-number guard, the sed extraction, the sign_update output inserted into <enclosure>, and the enclosure URL matching the uploaded dmg
  • sign-app.sh: find -depth signs Sparkle's nested code (Autoupdate, Updater.app, XPC services) before the framework and the app; -type f skips the Autoupdate symlink; nothing else turns the hardened runtime back on
  • Info.plist: merging INFOPLIST_FILE with GENERATE_INFOPLIST_FILE works, and the file sits outside the synced source folder
  • AppDelegate.swift: the SPUStandardUpdaterController init signature, the checkForUpdates(_:) selector, and that the controller stays alive (menu item targets are weak)
  • AccessibilityClient.swift: the Logger interpolations compile
  • README: the Reset Accessibility Permission control it mentions exists in SettingsView.swift

WPlus Code Review · commit 96956af · 114 s

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 deleted the branch feat/stable-signing November 17, 2026 17:25
@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