我在静态库中有一个 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)