Post

Replies

Boosts

Views

Activity

Comment on Strange behavior with 100k+ records in NSPersistentCloudKitContainer
I created a small test project that piggybacks off of the demo CKSyncEngine app (Contacts) and was able to replicate the issue. The contact record only includes 2 fields. The name of the contact and a date field. I generated exactly 10k contacts with random names (from faker). The local size of 10k records is 27.3 mb (which is already larger than the actual data due to the way it's being encoded as json) once all the records have been uploaded, iCloud reports 75MB.
Sep ’24
Comment on Strange behavior with 100k+ records in NSPersistentCloudKitContainer
So I shifted away from NSPersistentCloudKitContainer to CKSyncEngine as i needed more control (the history tracking requirement was one of the culprits) I have full control over the CKRecords sent to the server now so i know nothing extra is being sent. I'm still seeing a massive increase in usage in CloudKit over the main database. For 13k records, the local database is taking up 2.5MB where CloudKit is reporting 57.6mb
Sep ’24