Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

isthisonetaken

macrumors regular
Original poster
Jun 29, 2006
123
0
Hi All,

so I'm working on an app that uses Core Data to store information on a number of items. I have a helper app that I use to create a sqlite file to include objects with the app. I can get it working so that the first time the app runs, it uses that sqlite file to load in the information. I can even get it to work so that the second time the app runs, it ignores the sqlite file and keeps using the same persistent store.

I also have the ability within the model to have "Favourites". So it basically allows the user to pick an object and give it a nickname and image and is shown in a separate table view controller in the app. Again, all is working well.

My problem is that I want to be able to include updates down the road without deleting the users favourites. So I'm wondering what the best way is to have the app check to see if there is a new sqlite file, and if so, add whatever new additions are in it to the app (if it's easier, I'm sure I can set the helper app up to only create a sqlite file with the new objects) without deleting the users favourites. If possible, I'd also like to be able to check the favourites so that if one of them is for an item that gets deleted, it also gets deleted (or flagged in some way to let the user know).

I don't really know where to even begin in this. Any ideas?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.