ICloud storage damaged after changing kernel data model

I managed to synchronize the iCloud base database between devices (iPad and iPhone), but since the application is still under development, I managed to change the base data model. This causes a lot of error messages from iCloud to appear at startup, and I just can't get rid of them.

I know that iCloud is somewhat incompatible with model migration, etc., but at the moment this is not a problem, since I just want to erase the entire iCloud storage. I already tried to remove containers for the ubiquity and even deleted all application stores via device / icloud settings, but I can’t get the application back to work. Now unable to add a permanent store.

How to completely delete the storage files of my application to start from scratch?

+4
source share
3 answers

I had some success in resolving this problem by leaving the .sqlite database / directory as well as changing the transaction log directory to something else.

This is in addition to deleting everything from the device and data from iCloud settings, as you said, seemed to help.

+1
source

During development, I changed the name of the ubiquity container when there is an inconsistency (in the target settings). It was the best way to start from scratch for me.

0
source

You should use version control in your main data model, as described here:

Xcode 4, version of the kernel data model - installing the current version

This allows your application to move back and forth in versions of the data model.

Apple also allows you to delete the data store.

But I would recommend that you do not perform iCloud synchronization until you finish working with the model of your data model.

Here is additional information: http://developer.apple.com/library/ios/#releasenotes/DataManagement/RN-iCloudCoreData/

0
source

Source: https://habr.com/ru/post/1399565/


All Articles