apple / apple/sample-cloudkit-sync-engine
Creating a zone on first launch
- Vorherrschende Sprache
- Swift
- Sterne
- 270
- Forks
- 15
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, das accountChange-Handling der sample app, die .zoneNotFound-Wiederherstellung und den Startpfad der sync-engine nachzuverfolgen. Vergleiche die Zonenerstellung während des Starts mit der Erstellung vor dem Hochladen von Datensätzen und überprüfe anschließend das gewählte Verhalten anhand der Fehler beim ersten Upload und der Telemetriedaten des CloudKit-Dashboards.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- swift
- Bereich
- database
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100