English 中文(简体)
在XCode 4中将NSManagedObject添加到XCDataModelD核心数据包
原标题:Adding NSManagedObject INTO XCDataModelD Core Data Bundle in XCode 4

作为我的项目的一部分,已经有一个现有的“*.xcdatamodeld”核心数据包/包,其中包含一个“*.xcdata模型”(由于是当前版本,所以带有绿色勾号)以及许多.h和.m NSManagedObject文件。

我想让XCode生成一个新的NSManagedObject(.h和.m文件),并将其添加到“*.xcdatamodeld”捆绑包中。

我尝试过的方法有:

1) 突出显示“*.xcdatamodeld”并选择“编辑器>;创建NSManagedObject子类…”等。

2) 右键单击“*.xcdatamodeld”并选择“将文件添加到*”,然后选择NSManagedObject,等等。

我已经考虑过之后是否应该将文件移到捆绑包中,但我似乎也找不到任何方法。

请帮忙?

最佳回答

正如你所建议的,我的回答是:

我认为XCode4不可能实现这一点。在XCode3中,这没有问题。您仍然可以手动将文件复制到包中,但无法在模型中获取这些文件。我不认为这是XCode3的预期方式,苹果现在纠正了这一点。

问题回答

暂无回答




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签