import Combine import Sparkle /// Sparkle-Updates gegen `SUFeedURL` aus der Info.plist: automatische Prüfung /// im Hintergrund plus „Nach Updates suchen …“ im App-Menü. final class Updater: ObservableObject { @Published private(set) var canCheckForUpdates = false private let controller = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil) private var cancellable: AnyCancellable? init() { cancellable = controller.updater.publisher(for: \.canCheckForUpdates) .receive(on: DispatchQueue.main) .sink { [weak self] in self?.canCheckForUpdates = $0 } } func checkForUpdates() { controller.checkForUpdates(nil) } }