Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Creating a zone on first launch

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
swift
Domain
database

Research direction

Start by tracing the sample app's accountChange handling, .zoneNotFound recovery, and sync-engine startup path. Compare zone creation during launch with creation before record uploads, then verify the chosen behavior against first-upload errors and CloudKit dashboard telemetry.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Swift
Stars
270
Forks
15
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apple/sample-cloudkit-sync-engine

All issues in apple/sample-cloudkit-sync-engine

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.