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 の起動経路を追跡します。起動時のゾーン作成と、レコードのアップロード前の作成を比較し、そのうえで、最初のアップロード時のエラーと CloudKit ダッシュボードのテレメトリに照らして、選択した動作を検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- swift
- 領域
- database
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100