Post

Replies

Boosts

Views

Activity

Comment on Clarification on the correct use for CLServiceSession
I do start it again in the background. I try to restart the session as fast as possible. In regards to this: “You can only start holding one (a CLServiceSession) when your app is in the foreground." I think you can restart one in the background if and only if your app was relaunched in the background due to a core location update. All other background modes, such as app refresh or BGProcessing task, will break the session until the user has relaunched the app. I am looking for a way around this.
Dec ’24
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