Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9. Migrating and Optimizing with Core Da... > Xcode makes it easy to version your ...

Xcode makes it easy to version your data model

Fortunately, it’s pretty easy to create a new version of your data model using Xcode:

  1. Highlight iBountyHunter.xcdatamodeld.

    Then go to the Editor→Add Model Version menu option. That will generate a new file under the iBountyHunter.xcdatamodeld directory called iBountyHunter 2.xcdatamodel.

  2. Set the current version.

    Highlight the iBountyHunter.xcmodeld directory, then select the File Inspector on the Utilities Pane. Then in the Versioned Data Model section, select “iBountyHunter 2” as the Current version.

    image with no caption
  3. Update the new data model.

    Select iBountyHunter 2.xcdatamodel and re-edit the data model to add the captdate and captured fields back in as we did before. Now the old version is preserved and the changes are where they belong.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint