Check the CloudKit schema when packaging and show broken iCloud sync

This commit is contained in:
Ian Gulliver
2026-10-20 08:55:37 -07:00
parent e7724977c8
commit 8f3226350e
14 changed files with 502 additions and 288 deletions
+10
View File
@@ -5,6 +5,7 @@ import OpenAPIRuntime
typealias ClientRequest = Components.Schemas.ClientRequest
typealias ClientReply = Components.Schemas.ClientReply
typealias ClientSync = Components.Schemas.ClientSync
private let retryAfter = Duration.seconds(2)
private let checkEvery = Duration.seconds(10)
@@ -48,6 +49,15 @@ final class Remote {
heard = Date()
task.resume()
receive(task)
if let sync = Servers.shared.sync {
Task {
do {
_ = try await api.client.setClientSync(body: .json(sync)).noContent
} catch {
log.error("report icloud sync: \(errorText(error), privacy: .public)")
}
}
}
if checker == nil {
checker = Task { [weak self] in
while !Task.isCancelled {