Sharing the Data Model

Since we have already developed our application for iOS, we want to leverage as much of that knowledge as possible. With Core Data, that leveraging is extensive. The xcdatamodel file structure is identical between Mac OS X and iOS. This means we can use the same data model we’ve been using on iOS. Further, since the data model can be shared and reused, we can share and reuse the data objects as well.

As of the writing of this book, Xcode constructs projects so that the .xcodeproj file is above all the other files needed in the project. The purpose behind this setup is so we can more easily structure our projects to share components between iOS and Mac OS X. Therefore, we start our desktop project by creating a new project ...

Get Core Data in Objective-C, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.