NSPersistentCloudKitContainer uploads only a subset of records to public database in production environment

I'm having some issues where only a subset of records appear in CloudKit dashboard after I have saved some records in my iOS app using NSPersistentCloudKitContainer. I have noticed that when I'm running my app using the development environment of my CloudKit container everything works smoothly and is uploaded as expected but when I'm using the production environment only a subset of records are actually uploaded.

I'm pulling my hair on how to debug this. -com.apple.CoreData.CloudKitDebug and -com.apple.CoreData.SQLDebug pukes out too much info in the console for me to pinpoint any issue.

Is the data that doesn't appear in CloudKit Console synchronized to other devices? If yes, it may be that the queries from CloudKit Console didn't the right result set (because the CloudKit indexing isn't finished?), which may not impact your users. Otherwise, you can follow the Understand the export in TN3163 to analyze why the data isn't exported to CloudKit.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

NSPersistentCloudKitContainer uploads only a subset of records to public database in production environment
 
 
Q