feat(updater): add Sparkle Stage 1 - minimal UpdateService, menu, and guards (opt-in)#99
Conversation
|
Thanks for the Stage 1 design — the opt-in shape (no automatic checking, GitHub Releases fallback when SUFeedURL is unset) is exactly the right way to land Sparkle without committing to an appcast yet. Two things before this can merge: 1. Rebase against current main. #103 just landed and rewrites the trashDirectly callback signature in AppState.swift, so this PR conflicts. While you're rebasing, please drop the AppState.swift change entirely — wrapping 2. Stage 2 follow-up. Please open a tracking issue for Stage 2 covering: appcast generation in the release workflow, EdDSA signing key management (where the private key lives, how releases sign the appcast), Info.plist additions ( Tag #94 so it tracks back to the feature request. Thanks again. |
a20b521 to
18e3bb3
Compare
Bundles three user-facing fixes and one new feature for the next release: - #103: Protected-app uninstall now routes admin-required paths through the vetted CleaningEngine admin cleaner (fixes #93/#95/#97/#102). - #96: Orphan-file context menu uses activateFileViewerSelecting + exposes Copy Path / Move to Trash per row. - #92: AppInfoFetcher.appSize drops the broken directory-inode fast path; sums per-file allocated size so installed-app sizes match Finder's Size on disk. - #101: pt-BR localization, locale parity test guard, Settings language picker. - #99: Sparkle Stage 1 - opt-in UpdateService with Releases-page fallback. Signed-appcast work tracked in #104.
Stage 1 of in-app updates. Adds Sparkle as an opt-in dependency. - New `UpdateService` (singleton) wraps `SPUStandardUpdaterController` started with `startingUpdater: false` so no automatic update checks happen at launch. - `Updates → Check for Updates` command added to the main menu. - Safe fallback: when no `SUFeedURL` is configured in Info.plist, the menu item opens https://github.com/momenbasel/PureMac/releases/latest in NSWorkspace instead of starting Sparkle. - Sparkle SPM package pinned to `from: 2.0.0` in project.yml. Stage 2 (signed appcast, EdDSA key management, release-workflow integration that makes auto-update actually fire on new releases) is tracked separately. Rebased onto post-#103 main; the original PR's unrelated AppState concurrency-warning workaround was dropped during rebase. Verified: `xcodebuild build` succeeds on macOS 13 / Xcode 16. Refs #94.
Bundles three user-facing fixes and one new feature for the next release: - #103: Protected-app uninstall now routes admin-required paths through the vetted CleaningEngine admin cleaner (fixes #93/#95/#97/#102). - #96: Orphan-file context menu uses activateFileViewerSelecting + exposes Copy Path / Move to Trash per row. - #92: AppInfoFetcher.appSize drops the broken directory-inode fast path; sums per-file allocated size so installed-app sizes match Finder's Size on disk. - #101: pt-BR localization, locale parity test guard, Settings language picker. - #99: Sparkle Stage 1 - opt-in UpdateService with Releases-page fallback. Signed-appcast work tracked in #104.
feat(updater): add Sparkle Stage 1 - minimal UpdateService (opt-in)
What does this PR do?
UpdateServicethat initializes Sparkle's updater controller (without starting it automatically) and exposescheckForUpdates().Check for Updatescommand in the app menu to trigger the updater.SUFeedURLis present the button opens the GitHub Releases page.This is a conservative Stage 1 change intended only to add the UI hook and updater wiring so maintainers can review without needing CI secrets, appcast signing, or release-process changes.
Type of change
Files changed
project.yml— add Sparkle SPM package and target product dependencyPureMac/Services/UpdateService.swift— new minimal updater servicePureMac/PureMacApp.swift— addUpdatescommand menu andCheck for UpdatesbuttonPureMac/ViewModels/AppState.swift— small concurrency fix (MainActor wrap forLoggercall)PureMac.xcodeproj/project.pbxproj— Xcode project updated to include Sparkle/package entriesWhy this change
Related issues
Testing done
xcodegen generate→open PureMac.xcodeproj→ Build succeeded.Check for Updatesopens Releases whenSUFeedURLis not set; whenSUFeedURLis present Sparkle's updater is started and checks for updates.How to test locally
xcodegenis installed:brew install xcodegenxcodegen generateopen PureMac.xcodeprojSUFeedURLin the app's Info.plist the app opens the GitHub Releases page (safe fallback).Notes for reviewers
AI-assistance disclosure
Drafted using Claude Code. Built the project locally to confirm my version compiles. I understand what the code does.