Cannot find "Core Data" new file template?

I’m reading the app development guide you produced, and while I am learning a great deal from your book I have hit a roadblock in the Photorama - Core Data section on page 357. After moving photo.swift to trash, it says to create a new file - and under the iOS section, select Core Data (and a few other steps). Is this changed in a recent xCode update? Core Data is a subheading but it is not an option for a template file.

Any guidance someone can give here would be very appreciated.

The book says,

Create a new file.

To do that, you click on File>New>File

After you do that, a “template selection screen” should appear. You should see the headings:





Core Data should be a subheading under the iOS heading:

  User Interface
  Core Data



Are you saying that you are unable to select CoreData and see the choices in the rectangular box on the right, which include NSManagedObject subclass? The book says:

…Choose Core Data, and then choose NSManagedObject subclass and click Next

The book does not say:

…Choose Core Data and click Next

When you choose the Core Data subheading under the iOS heading, the template selection screen shows you which templates are available for iOS Core Data.

Thank you for your quick response. I see the attached screenshot in the template selection screen. There seems to be no way to select “Core Data”- It is merely a subheading here. Clicking either Data Model or Mapping Model options within that subheading do not lead to any options for an NSManagedObject subclass.

Have you any ideas how I could proceed?

Thank you

Yeah, that’s different than the template screen in Xcode7.2.1. In Xcode7.2.1, you have to select a subheading, like Core Data, to reveal the available templates for that subheading. In your case, the available templates for each subheading are all on display–you just don’t have the “NSManagedObject subclass” template choice.

What version of Xcode are you using? According to this post:

it looks like Xcode 8 automatically generates the NSMangagedObject Subclass file. I think if you read all the answers in the thread, you’ll be able to find something that allows you to follow along with the book.

This worked perfectly! Thanks for your help. I had to create the subclass from inside the Core Data file I’d already made.