Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleting core data version xcdatamodel files

I've created a versioned Core Data model in my iOS app, and it has several versions created so far (several .xdatamodel files within the .xcdatamodeld bundle). Before shipping the app, I'm considering deleting these old versions so I can start with a single clean data model - and data loss isn't an issue at this stage.

Is this possible? And what would be the best way to achieve this without simply deleting all Core data files and recreating a new model.

like image 942
Andrew Avatar asked Jul 15 '11 19:07

Andrew


People also ask

How do I uninstall Xcdatamodel?

You can delete a data model from the Data Model management page or the Data Model Editor. Just click Edit and select Delete. Note: If your role grants you the ability to create data models, it should grant you the ability to delete them as well.


1 Answers

Deleting the old models means you cannot migrate any existing data stores. I assume you're ok with that given your statement about data loss. If you want to start fresh, you can take the current xcdatamodel, copy it somewhere else (e.g. your Desktop), then delete the xcdatamodeld folder. At this point, you can drag your saved xcdatamodel back into Xcode and re-add it as a non-versioned file.

like image 130
Lily Ballard Avatar answered Sep 29 '22 05:09

Lily Ballard