Disable Sparkle updater in debug builds - #140
Merged
Merged
Conversation
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.
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 Changed
AppUpdater.initreturns early under#if DEBUGbefore creating theSPUStandardUpdaterController, so debug builds never start Sparkle or check the appcast. The class already handles the no-updater state (canCheckForUpdatesstays false; the Settings UI takes the same path previews use viaAppUpdater(updatesEnabled: false)). Release builds are unchanged.Why
Local Xcode builds carry the placeholder
CFBundleVersionof 1 — the release workflow stamps the real build number only in CI. Sparkle comparesCFBundleVersionagainst the appcast'ssparkle: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
xcodebuild -scheme BitDream -configuration Debug).CODE_SIGNING_ALLOWED=NO(this machine lacks the Developer ID cert; unrelated to the change).CFBundleShortVersionString 2.0.3/CFBundleVersion 1, while the published appcast advertisessparkle:version 2.0.2.