The sample app creates a custom zone when the accountChange event is triggered or if a .zoneNotFound error occurs while sending records. This naturally leads to .zoneNotFound errors on the first upload(s) until it fixes itself.
Is there a specific reason it's done this way? Would it be possible to call
self.syncEngine.state.add(pendingDatabaseChanges: [ .saveZone(CKRecordZone(zoneName: Self.zone.zoneID.zoneName)) ]) at app launch and have it finish before any other sync operations can occur?
Or is the approach in this sample project the recommended way and you just have to live with those error occurring once. This makes it especially hard to use the Telemetry Error feature in the CloudKit dashboard because you can never be sure if those errors are genuine.
The sample app creates a custom zone when the accountChange event is triggered or if a .zoneNotFound error occurs while sending records. This naturally leads to .zoneNotFound errors on the first upload(s) until it fixes itself.
Is there a specific reason it's done this way? Would it be possible to call
self.syncEngine.state.add(pendingDatabaseChanges: [ .saveZone(CKRecordZone(zoneName: Self.zone.zoneID.zoneName)) ])at app launch and have it finish before any other sync operations can occur?Or is the approach in this sample project the recommended way and you just have to live with those error occurring once. This makes it especially hard to use the Telemetry Error feature in the CloudKit dashboard because you can never be sure if those errors are genuine.