XCode 5 中的核心数据 - 手动安装以及如何安装?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19643029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:12:49  来源:igfitidea点击:

Core Data in XCode 5 - installing manually and how?

xcodecore-data

提问by Forever a noob

It seems like that in the new version of XCode, Core Data is something i have to install manually. The check box that used to be there when i create a new project is gone.

似乎在新版本的 XCode 中,Core Data 是我必须手动安装的东西。创建新项目时曾经存在的复选框消失了。

I've searched to the end of the internet, finding no answer that seems to work in the new version of XCode. Can someone confirm my problem, and does someone have a solution for it? Thanks in advance.

我已经搜索到互联网的尽头,没有找到似乎适用于新版本 XCode 的答案。有人可以确认我的问题,有人有解决方案吗?提前致谢。

回答by Nikos M.

Core Data checkbox is not available in all type of projects. If you try to create an empty project, the "Use core data" checkbox is still there (this was the same in xcode 4).

并非所有类型的项目都提供核心数据复选框。如果您尝试创建一个空项目,“使用核心数据”复选框仍然存在(这与 xcode 4 中的相同)。

You can add core data manually by following this tutorial:

您可以按照本教程手动添加核心数据:

http://wiresareobsolete.com/wordpress/2009/12/adding-core-data-existing-iphone-projects/

http://wiresareobsolete.com/wordpress/2009/12/adding-core-data-existing-iphone-projects/

回答by MoralCode

you could create a new master-detail Xcode project (check the 'use core data' checkbox when creating) and just copy the code from there.

您可以创建一个新的主从 Xcode 项目(在创建时选中“使用核心数据”复选框),然后从那里复制代码。

this is particularly helpful when combined with:

这在结合使用时特别有用:

http://wiresareobsolete.com/2009/12/adding-core-data-existing-iphone-projects/

http://wiresareobsolete.com/2009/12/adding-core-data-existing-iphone-projects/