apple / apple/sample-cloudkit-sync-engine
Creating a zone on first launch
- 主要语言
- Swift
- 星标
- 270
- 派生
- 15
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先跟踪 sample app 的 accountChange 处理、.zoneNotFound 恢复以及 sync-engine 启动路径。比较启动期间创建 zone 与上传 record 之前创建 zone 的行为,然后根据首次上传错误和 CloudKit 仪表板遥测数据验证所选行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- swift
- 领域
- database
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100