CoreData:Migrate data from bundled db


#1

Hi All,

I am not sure whether this topic is relevant to the book, but I hope I can get an answer to my problem here.

Our app (iOS) is having a coredata store which is based on a single coredata model. There are read-only data as well as read-write data.

The read-only data are pre-loaded and bundled along with the app, so that on a fresh install, this database is copied to the application sandbox and from there on the data base will be updated via webservice (ie only the changed data will get updated from webservice so that less data is transferred).

Now we have situation where we need to add more attributes to the read-only entities.

Light weight migration will help in upgrading the schema easily, but the problem is about the new data, since we are adding new attributes to all the read-only entities, all the data records are changed and a webservice sync might take a lot of time to download and update data. To avoid this we are bundling the updated data along with the app ( this will solve the issue for a fresh install). But for the users which are upgrading the app is there a standard mechanism to copy the read-only entities from the bundled db and update those to the existing database in the sandbox so that they will get the updated read-only data and also their read-write data remains intact.

-john