
CloudKit / CoreData Sync: Why am I seeing 3 different datasets across Dev, Prod, and Xcode?
Hello everyone,
I'm currently testing iCloud/CloudKit performance for my app using NSPersistentCloudKitContainer. I am using a single Apple ID throughout the entire testing process.
I've noticed a weird observation where I seem to have three distinct datasets. I was expecting there to be only two (Development and Production), so the third one is throwing me off.
Here is what I am seeing:
- iCloud Console (Development): Shows Data Set A. (Note: I am looking at the private database /
com.apple.coredata.cloudkit.zone. I had to add therecordNameindex to browse this data). - Real iPhone (App Store / TestFlight fresh install): Shows Data Set B.
- Real iPhone & Simulator (Xcode fresh install): Shows Data Set C.
(Note: I can't browse the iCloud console for Production right now because it lacks the recordName index, and I don't want to modify Production at this moment).
My questions:
- Why is there a 3rd set of data (Set C) on Xcode builds? I expected it to match the Development console (Set A).
- Is it possible the "iCloud console (Development)" is delayed and showing an old dataset?
- How should I best debug this discrepancy?
Any insights would be greatly appreciated!
UPDATE:
I believe the CloudKit console has an issue when displaying a large number of rows (around 1,677).
If I don't perform any filtering and make sure I am on page one (by scrolling to the bottom and ensuring there is only a 'next' button and no 'previous' button), sorting by 'Created' only shows records up to the year 2024.
However, if I apply a text filter to search for the latest record, my 2026 records appear correctly.
I have attached a screenshot for your reference.
That's mean, iCloud Console (Development) is showing a truncated version of Data Set C.