I'm facing the problem below:
When the user decides to delete all iCloud data inside settings, automatically, all local core-data savings are deleted as well.
After some debugging, I could find out that this exactly happens after the first time I initialize an NSPersistentCloudKitContainer. So somehow the merge happens to reset the local data?
I have also made a dummy project using the NSPersistentCloudKitContainer. I could observe this behaviour as well, which makes me conclude that this happens by default?
Any help would be greatly appreciated. I could tell you the details if you wish, I just don't know what I should include.
Update
Could this be intended?
It says this action will also delete all data stored on this iPhone.
But what if the user only whats to clean some iCloud space?
Interesting
From testing many real-world applications - part of them shows the behavior of losing all local data as well. But there is also a decent amount of apps keeping the local data after the reset.
I also tested it with apples own Clips app. All local-data were gone as well.