Skip to content

feat(updater): add Sparkle Stage 1 - minimal UpdateService, menu, and guards (opt-in)#99

Open
3manu31 wants to merge 1 commit into
momenbasel:mainfrom
3manu31:feature/add-sparkle-updater
Open

feat(updater): add Sparkle Stage 1 - minimal UpdateService, menu, and guards (opt-in)#99
3manu31 wants to merge 1 commit into
momenbasel:mainfrom
3manu31:feature/add-sparkle-updater

Conversation

@3manu31
Copy link
Copy Markdown

@3manu31 3manu31 commented May 17, 2026

feat(updater): add Sparkle Stage 1 - minimal UpdateService (opt-in)

What does this PR do?

  • Adds a minimal, opt-in in-app updater integration using Sparkle via SPM.
  • Wires an UpdateService that initializes Sparkle's updater controller (without starting it automatically) and exposes checkForUpdates().
  • Adds a Check for Updates command in the app menu to trigger the updater.
  • Keeps a safe fallback: when no SUFeedURL is 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

  • Bug fix
  • New feature (opt-in, non-invasive)
  • Performance improvement
  • UI/UX enhancement
  • Documentation
  • Other (describe)

Files changed

  • project.yml — add Sparkle SPM package and target product dependency
  • PureMac/Services/UpdateService.swift — new minimal updater service
  • PureMac/PureMacApp.swift — add Updates command menu and Check for Updates button
  • PureMac/ViewModels/AppState.swift — small concurrency fix (MainActor wrap for Logger call)
  • PureMac.xcodeproj/project.pbxproj — Xcode project updated to include Sparkle/package entries

Why this change

  • Stage 1: Introduce a safe, reviewable integration that does not require signing keys or CI changes.
  • Keeps the codebase ready for a separate Stage 2 PR that would add appcast generation and signed updates.

Related issues

Testing done

  • Built locally: xcodegen generateopen PureMac.xcodeproj → Build succeeded.
  • Runtime: Tested on macOS Tahoe (26). Check for Updates opens Releases when SUFeedURL is not set; when SUFeedURL is present Sparkle's updater is started and checks for updates.

How to test locally

  1. Ensure xcodegen is installed: brew install xcodegen
  2. Generate project: xcodegen generate
  3. Open in Xcode: open PureMac.xcodeproj
  4. Build & run. From the app menu: Updates → Check for Updates.
    • With no SUFeedURL in the app's Info.plist the app opens the GitHub Releases page (safe fallback).
    • When maintainers add a feed URL + signed appcast, Sparkle will handle update checks.

Notes for reviewers

  • This PR is intentionally minimal and conservative. It adds no CI changes, no signing keys, and no production appcast generation.
  • If maintainers want Stage 2 (signed appcast, CI workflow updates), I can prepare a separate PR describing the required secrets and workflow changes.

AI-assistance disclosure

Drafted using Claude Code. Built the project locally to confirm my version compiles. I understand what the code does.

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