无法添加对 xcdatamodelId 的引用



我在静态库中有一个xcdatamodel文件。为了在我的主应用程序中引用该文件,我通过xcode将该文件拖动到主应用程序。这很有效。我在xcdatamodel文件中添加了一个版本。这创建了一个xcdatamodelid文件。如果我试图将xcdatamodelid拖到我的主项目中,xcode就会崩溃。我不能再拖动xcdatamodel文件了。如何添加对数据模型的引用?

我使用的是xcode 4.6.3。

xcode堆栈跟踪的顶部:崩溃线程:0调度队列:com.apple.main-read

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4H1503
ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-2091/Framework/Classes/FilePaths/DVTFilePath.m:461
Details:  str should be an instance inheriting from NSString, but it is nil
Object:   <DVTFilePath>
Method:   +filePathForPathString:
Thread:   <NSThread: 0x40030a220>{name = (null), num = 1}
Hints:   None
Backtrace:
  0  0x0000000106670a2a -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
  1  0x000000010591f4e4 _DVTAssertionFailureHandler (in DVTFoundation)
  2  0x00000001058a1c9f +[DVTFilePath filePathForPathString:] (in DVTFoundation)
  3  0x0000000109a5b8d5 -[XCVersionGroup saveCurrentVersion] (in DevToolsCore)
  4  0x0000000109935b53 -[PBXGroup insertItems:atIndex:] (in DevToolsCore)
  5  0x0000000109ab2b83 -[Xcode3Group insertGroupSubitems:atIndexes:] (in DevToolsCore)

我升级到xcode 5,现在工作正常。顺便说一句,当我把文件拖到我的项目中时,窗口没有给我复制或添加引用的选项。我认为这是xcode 4的一个错误。现在xcode 5已经发布,这就不再相关了。

最新更新