CoreData model can be created programmatically with NSManagedObjectModel class.
The app shows a list of shelves (master) end list of books (detail).
Here the first commit is a classic approach using an xcdatamodeld file, and the second uses NSManagedObjectModel.