In my iOS app, I store two types of data in CoreData. I Generate a type user, other types are pregrented The database is currently all in one store, which goes to the documents folder. But this is not a good way, so I will split into two separate shops.
There are two problems:
- The pre-dated database should not be used by iCloud.
- When an update of the app is provided, user data should be kept, but the prefilled database should be overwritten. (The content will be updated in the preconfigured database, even if the data model is unchanged.)
For Problem 1, I can either put the stored database store in the cache directory or put it in Can I delete the backup directory to document the document as if the cache directory can be emptied at any time, it would be better to use the document folder without backup However, does this solve the problem 2? Is this, can the preceding database be overwritten after the update?
If not, is there any other solution?
You can have pre-generated rated databases in the Documents folder and can flag it to leave backup in iCloud Are there. Although you have to write a few scripts to overwrite the data or on the update you can delete your predicted store completely and make it again with the updated data.
No comments:
Post a Comment