Repository navigation
feat(updates): add in-app updates with Sparkle - #14
Merged
Merged
Conversation
Gear menu > Check for Updates… (Buscar atualizações… in pt-BR) runs a user-initiated Sparkle check with the framework's standard dialogs: release notes, download, Install and Relaunch. No background checks. - Sparkle 2.10.1 via SwiftPM, app target only; TokenBarKit sees only the UpdateChecking protocol. - Feed: appcast.xml attached to the latest published GitHub Release, so drafts and pre-releases are never offered. - release.sh re-signs Sparkle's helpers, EdDSA-signs the zip, checks the signature against the app's SUPublicEDKey and writes dist/appcast.xml (scripts/appcast.sh). It refuses to run while SPARKLE_PUBLIC_ED_KEY is empty; the workflow requires the SPARKLE_PRIVATE_KEY secret. - Embedding a framework needed LD_RUNPATH_SEARCH_PATHS, and ad-hoc builds (Debug, unsigned releases) need disable-library-validation to load Sparkle under the hardened runtime. Developer ID builds do not get that entitlement. - scripts/test-update.sh: local end-to-end test with two release builds, a throwaway key and a 127.0.0.1 feed (update, none, bad-signature). - Docs: README Updating section (0.1.0 users install once by hand), privacy, releasing guide, checklist, architecture, roadmap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Running the Release workflow by hand (workflow_dispatch) runs the same build job as a tag push, with the same scripts/release.sh and secrets, and ends after uploading dist/ (signed zip, dmg, appcast.xml, SHA256SUMS.txt) as an Actions artifact. No tag, no release, no change to the update feed. The workflow is split in two jobs: - build: read-only token, holds the signing secrets, uploads dist/. - draft-release: tag pushes only, contents: write, creates the draft from that same artifact. The tag check runs only on tag pushes. docs/releasing.md explains that the trigger must be on the default branch before it can be run, and how to download and verify the artifact; the release checklist asks for a reviewed dry run before tagging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sparkle ships signed, so Xcode cannot strip it and warned on every build. No other binary goes through a copy phase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: where Check for Updates… is (gear menu, above Quit), the Sparkle button names in both languages, that no release has the updater yet, and step-by-step manual install for 0.1.0 users. - releasing.md: numbered flow (local test → dry run → checks → tag → draft review → publish), the two workflow jobs, a new "Reviewing the draft" section, merge and dry run as prerequisites for the first updater release; drop machine-specific wording. - release-checklist.md: check the draft's appcast.xml; unsigned names. - architecture.md, roadmap.md: Sparkle in the app target; in-app updates listed as planned for the first release after 0.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DerRafDev
marked this pull request as ready for review
November 7, 2026 03:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
In-app updates with Sparkle 2: gear menu › Check for Updates… (Buscar atualizações… in pt-BR) runs a user-initiated check with Sparkle's standard dialogs: release notes, download, Install and Relaunch. There are no background checks. The release workflow also gets a manual dry run that builds the release and uploads
dist/as an Actions artifact, without a tag or a release.Draft until the release signing key exists.
SPARKLE_PUBLIC_ED_KEYinapps/macos/Config/TokenBar.xcconfigis still empty, andscripts/release.shrefuses to build while it is. The maintainer adds the public key to this branch and theSPARKLE_PRIVATE_KEYsecret to the repository.Why
TokenBar had no way to update: every version had to be downloaded and approved by hand. Sparkle is the standard, audited framework for this on macOS. It is the project's first third-party dependency;
docs/architecture.md › Dependenciesexplains its boundary: app target only, andTokenBarKitsees only anUpdateCheckingprotocol. There is no issue for it; the scope was agreed directly with the maintainer.What changed
App
Package.resolvedcommitted).SoftwareUpdater(app target) wrapsSPUStandardUpdaterController.UpdateCheckinglives inTokenBarUI, and the popover adds the menu item (disabled while a check runs) plus its pt-BR string.Config/Info.plistis merged into the generated plist:SUFeedURL,SUPublicEDKey,SUEnableAutomaticChecks = NO,SUVerifyUpdateBeforeExtraction = YES.https://github.com/DerRafDev/tokenbar/releases/latest/download/appcast.xml, i.e. theappcast.xmlof the latest published release. Drafts and pre-releases are never offered.Build settings, found while testing real release builds
LD_RUNPATH_SEARCH_PATHS: without it the app crashed at launch, because it could not findSparkle.framework. CI only builds, so it would not have caught this.com.apple.security.cs.disable-library-validation. Without it the hardened runtime refuses Sparkle, since there is no Team ID to match. The newTokenBar-AdHoc.entitlementsis applied byrelease.shonly when there is no Developer ID. Developer ID builds do not get it.COPY_PHASE_STRIP = NOremoves a new "not stripping binary because it is signed" warning for Sparkle.Release pipeline
scripts/release.sh:dist/appcast.xml(withscripts/appcast.sh);SUPublicEDKeyinside the built app, and stops if they are not a pair..github/workflows/release.ymlis split into two jobs:build(read-only token, holds the signing secrets) uploadsdist/as an artifact;draft-release(tag push only,contents: write) creates the draft from that same artifact.workflow_dispatchruns onlybuild. The tag/version check is tag-only.SPARKLE_PRIVATE_KEYis required.scripts/test-update.sh: local end-to-end test with two real release builds, a throwaway key, a separate bundle ID and a127.0.0.1feed (update,none,bad-signature).Docs: README (Updating, plus the one-time manual install for 0.1.0 users, privacy, features),
releasing.md(Sparkle, key setup, dry run, checking the zip and appcast, reviewing the draft, local test),release-checklist.md,architecture.md,roadmap.md.How it was tested
Locally on macOS 27 / Xcode 27:
scripts/lint.shandscripts/test.sh(58 tests) pass.NSAppleEventsUsageDescription(Release) and the AppIntents metadata notice, which both exist onmaintoo.actionlint1.7.12 passes on every workflow.scripts/test-update.sh: realrelease.shbuilds, ad-hoc signed, clicked through the real menu.menuBarDisplay,refreshInterval). Done twice.release.shwith the key passed throughSPARKLE_PRIVATE_KEY, as the workflow does. The documented checks all pass on its output:xmllint;lengthin the appcast;sign_update --verify;SUPublicEDKeyandSUFeedURLinside the zip's app;codesign --verify --deep --strict.Still to validate in Actions
These cannot run before the key exists and this PR is merged (
workflow_dispatchonly works once the workflow is on the default branch).SPARKLE_PUBLIC_ED_KEYto this branch and theSPARKLE_PRIVATE_KEYsecret to the repository.main(Actions › Release › Run workflow). Download the artifact and check it as indocs/releasing.md › Dry run. This is the first time the private key is used from the secret andupload-artifact@v7runs.draft-releasedownloads the artifact (download-artifact@v8) and creates the draft. Review it as inreleasing.md › Reviewing the draft.Nothing in this PR creates a tag, publishes a release or changes the public feed. Until the first release with the updater is published, Check for Updates… shows an error, because 0.1.0 has no
appcast.xml.Checklist
scripts/lint.shandscripts/test.shpass locallybuild/, which is ignored)🤖 Generated with Claude Code