Make an `UpdateController` class the same as https://github.com/sparkle-project/Sparkle/blob/2.x/Sparkle/SPUStandardUpdaterController.m but for our updater types.
Create UpdateController class for custom updater
Unlisted
Created UpdateController.swift modeled after SPUStandardUpdaterController. It wraps Sparkle's updater with Ghostty's custom UpdateDriver, UpdaterDelegate, and UpdateViewModel types.
I made some manual changes, try to build and fix it up.
Build successful! Fixed the error by adding try? to the updater.start() call.
Replace our updater setup in @macos/Sources/App/macOS/AppDelegate.swift with this new controller. Don't forget the menu items.
✅ Build successful! Replaced the Sparkle updater setup in AppDelegate with the new UpdateController class. Changes:
- Replaced
SPUStandardUpdaterControllerwithUpdateController - Removed separate
updaterDelegateproperty (now managed internally) - Updated
checkForUpdates(_:)action to use the controller - Added menu validation for the "Check for Updates" menu item
- Used lazy initialization pattern to work around Swift initialization ordering