Xcode 4 missing “use core data” checkbox for all p

2019-02-21 20:19发布

问题:

I have just installed Xcode 4 and I am trying to create projects that use core data. However, the checkbox to use core data is not available in any of the project templates. Has anyone else run into this or know how to solve it. I have tried reinstalling Xcode, which does not solve the problem.

回答1:

The "Use Core Data" checkbox appears only when you choose certain kinds of templates, like the Empty Application iOS template...

Try the different templates to see exactly for which one Core Data is available...



回答2:

As the most upvoted answer of Lindemann says, CoreData is not available for all the project templates. If you wonder why is that, then here is Apple's reason for that.

Important: Not all templates offer a Core Data option. Core Data is an advanced technology that is not required for creating simple applications.

https://developer.apple.com/library/ios/documentation/DataManagement/Devpedia-CoreData/coreDataOverview.html



回答3:

Did you try creating a new project using one of the main templates like "Cocoa Application"? If you're used to one of the preview releases of Xcode 4, note the options are no longer on the main template sheet but rather show up on a second sheet after choosing a template.



回答4:

You can change manually template to add coredata checkbox.

  • Right-click on xCode app icon, and show content package.
  • Then follow this : http://rypearts.com/proof/bob/r1/2012/03/04/creating-custom-xcode-4-file-templates/ and this : http://ennio.sperimentando.it/2011/08/22/xcode-setting-the-tab-bar-project-template-to-support-core-data-4/