secretive/Sources/SecretiveUpdater/SecretiveUpdater.swift
Max Goedjen 5467474d88
Switch to higher level XPC & enforce signing requirements (#681)
* Revert "Add launch constraints (#678)"

This reverts commit c5a610d786.

* .

* Cleanup.
2025-09-09 06:25:40 +00:00

18 lines
468 B
Swift

import Foundation
import OSLog
import XPCWrappers
import Brief
final class SecretiveUpdater: NSObject, XPCProtocol {
enum Constants {
static let updateURL = URL(string: "https://api.github.com/repos/maxgoedjen/secretive/releases")!
}
func process(_: Data) async throws -> [Release] {
let (data, _) = try await URLSession.shared.data(from: Constants.updateURL)
return try JSONDecoder().decode([Release].self, from: data)
}
}