无法添加对xcdatamodelId的引用

时间:2013-06-25 19:56:01

标签: ios xcode core-data xcdatamodel

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

我正在使用xcode 4.6.3。

xcode堆栈跟踪的顶部: Crashed Thread:0 Dispatch queue:com.apple.main-thread

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)

1 个答案:

答案 0 :(得分:0)

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

相关问题