Check the CloudKit schema when packaging and show broken iCloud sync
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user