How to fix ZONE_NOT_FOUND error in CloudKit Dashboard?

Hello, hope you are doing well.


In my app I use CloudKit to sync Core Data data ("Use Core Data" and "Use CloudKit" checkboxes were checked when creating a project).


In

AppDelegate.swift
I did not change code below "Core Data stack" mark. In code I don't specified zone anywhere.


During development I tested app on my devices using same iCloud account. Sync worked well. After testing I deployed my Development schema to Production schema. Later, I published an app on App Store.


Now in CloudKit Dashboard, in Production > Telemetry module I see

ZONE_NOT_FOUND
errors with a count that equals to approximately number of my users.


Please, see the screenshot.


I tested my app (now downloaded directly from App Store) on my friend devices — sync working, but one note: her devices were used during development, too (I connected them to my Mac and build and install app from Xcode a number of times).


Another note: when I go to Data module in Production section in CloudKit Dashboard, in Zone menu I see 2 options:

  1. com.apple.coredata.cloudkit.zone
  2. _defaultZone


And when I press "Query Records", I see my data rows only when

com.apple.coredata.cloudkit.zone
selected.


This error worries me, what can I do when app already in production to fix it, make it go away?

Answered by in 614294022
I think this is expected. NSPersistentCloudKitContainer saves data to CloudKit and it encounters this error the first time it saves something to the cloud. It automatically creates the zone and it won't encounter this error on subsequent requests. That's why you're only seeing this error once per user.
Accepted Answer
I think this is expected. NSPersistentCloudKitContainer saves data to CloudKit and it encounters this error the first time it saves something to the cloud. It automatically creates the zone and it won't encounter this error on subsequent requests. That's why you're only seeing this error once per user.
How to fix ZONE_NOT_FOUND error in CloudKit Dashboard?
 
 
Q