views:

23

answers:

1

I just wonder what this third panel for versioning configuration is, in the Xcode data modeler on the top right, third tab. Want to see some examples for what this is good for and wether or not I should already provide versioning information right from the beginning.

Any cool link and hint is appreciated.

+1  A: 

The first thing I'd read would be Apple's Core Data Model Versioning and Data Migration Programming Guide.

You don't need to provide versioning information from your first build of an application. However, once your application has seen its first release and people are starting to use it, you will want to add versions of your data model for each time you change that model. Simple changes to the data model can be automatically migrated at startup of your application using the lightweight migration feature introduced with iPhone OS 3.0 and Snow Leopard. More complex data model changes may require setting up manual migration.

Brad Larson
Thanks! Can you give some small examples when a lightweight migration would suffice and when a heavy manual migration would have to be programmed?
dontWatchMyProfile
@mystify - Lightweight migration will handle simple changes, like the addition of an attribute, changing whether an attribute is optional, or providing a default value for an attribute. Renaming an attribute can also be migrated automatically if you provide a renaming identifier in your Xcode data model for the attribute. This option can be found on the Configurations tab in the far right of the browser area when an attribute is selected. For anything more complex, you'll need to use manual migration.
Brad Larson