Skip to content

Disable Sparkle updater in debug builds - #140

Merged
austin-smith merged 1 commit into
mainfrom
disable-sparkle-updater-in-debug-builds
Aug 12, 2026
Merged

austin-smith merged 1 commit into
mainfrom
disable-sparkle-updater-in-debug-builds

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

What Changed

AppUpdater.init returns early under #if DEBUG before creating the SPUStandardUpdaterController, so debug builds never start Sparkle or check the appcast. The class already handles the no-updater state (canCheckForUpdates stays false; the Settings UI takes the same path previews use via AppUpdater(updatesEnabled: false)). Release builds are unchanged.

Why

Local Xcode builds carry the placeholder CFBundleVersion of 1 — the release workflow stamps the real build number only in CI. Sparkle compares CFBundleVersion against the appcast's sparkle:version, so every debug build looks older than any published release, producing a bogus downgrade prompt (e.g. "BitDream 2.0.2 is now available—you have 2.0.3"). Dev builds shouldn't self-update from the public feed at all.

Validation

  • Debug configuration builds clean (xcodebuild -scheme BitDream -configuration Debug).
  • Release configuration compiles clean with CODE_SIGNING_ALLOWED=NO (this machine lacks the Developer ID cert; unrelated to the change).
  • Verified the trigger: a local Debug build's Info.plist reports CFBundleShortVersionString 2.0.3 / CFBundleVersion 1, while the published appcast advertises sparkle:version 2.0.2.

debug builds carry the placeholder cfbundleversion of 1, so sparkle
compares it against the appcast and offers every published release as
an update, showing a downgrade prompt on dev builds. skip creating the
updater controller entirely under debug; release builds are unchanged.
@austin-smith
austin-smith merged commit 6bb8773 into main Aug 12, 2026
3 checks passed
@austin-smith
austin-smith deleted the disable-sparkle-updater-in-debug-builds branch August 12, 2026 06:53
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