Sharing the Data Model
Since we’ve 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 this writing, Xcode constructs projects so that the .xcodeproj file is above all of 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 named Desktop. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access