Reputation: 1044
I'm using NSPersistentCloudKitContainer
in my app in production but some of my users are informing me that data is missing after updating to recent version which introduced NSPersistentCloudKitContainer
. For majority of my users it's working without problems.
These users have checked in iCloud settings if iCloud is turned on for my app. What can I do to prevent missing data while using NSPersistentCloudKitContainer
Upvotes: 5
Views: 294
Reputation: 51
Did you solve this issue?
It might be problem of NSPersistentHistoryTrackingKey
setting for NSPersistentContainer
.
If you use NSPersistentContainer
without NSPersistentHistoryTrackingKey
option as True, NSPersistentCloudKitContainer
cannot track the existing data.
In my case, I force sync to add new boolean attribute to core data model. And batch operation to all data to set true as new attribute.
Upvotes: 2