add Sparkle appcast

This commit is contained in:
Micha
2025-11-25 16:21:07 +01:00
parent dc9560e31a
commit 01c89de738
18 changed files with 262 additions and 356 deletions

View File

@@ -0,0 +1,26 @@
import Sparkle
import Foundation
@MainActor
final class SparkleUpdater: NSObject, ObservableObject {
let controller: SPUStandardUpdaterController
override init() {
self.controller = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil)
super.init()
}
var automaticallyChecksForUpdates: Bool {
get { controller.updater.automaticallyChecksForUpdates }
set { controller.updater.automaticallyChecksForUpdates = newValue }
}
var automaticallyDownloadsUpdates: Bool {
get { controller.updater.automaticallyDownloadsUpdates }
set { controller.updater.automaticallyDownloadsUpdates = newValue }
}
func checkForUpdates() {
controller.checkForUpdates(nil)
}
}