iOS 核心数据 : "Data Model Version Compiler" error
<p><p>我在我的项目中创建了一个数据模型文件“ChatModel.xcdatamodeld”。然后我在github上 merge 了分支。 “project.pbxproj”中存在冲突。我修好了它们。然后错误发生了:</p>
<blockquote>
<p>"/Users/mac/zhongqing-ios/Zhongqing/Zhongqing/Model/ChatModel.xcdatamodeld: Could not create bundle folder for versioned model at '/Users/mac/Library/Developer/Xcode/DerivedData/Zhongqing-chngcirectbawjenegkxtgdfgoux/Build/Products/Debug-iphonesimulator/Zhongqing.app/ChatModel.momd'".</p>
<p>"/Users/mac/zhongqing-ios/Zhongqing/ChatModel.xcdatamodeld: Unable to write VersionInfo.plist for versioned model at '/Users/mac/Library/Developer/Xcode/DerivedData/Zhongqing-chngcirectbawjenegkxtgdfgoux/Build/Products/Debug-iphonesimulator/Zhongqing.app/ChatModel.momd'".</p>
</blockquote>
<p>每次我必须删除派生数据才能运行项目。
然后错误再次发生。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>虽然有些文件是可读的,但它们应该被视为二进制文件。 <code>.pbxproj</code>文件就是很好的例子。</p>
<p>来自 <a href="http://git-scm.com/book/en/Customizing-Git-Git-Attributes#Binary-Files" rel="noreferrer noopener nofollow">pro-git</a> </p>
<blockquote>
<p>Some files look like text files but for all intents and purposes are to be treated as binary data. For instance, Xcode projects on the Mac contain a file that ends in .pbxproj, which is basically a JSON (plain text javascript data format) dataset written out to disk by the IDE that records your build settings and so on. Although it’s technically a text file, because it’s all ASCII, you don’t want to treat it as such because it’s really a lightweight database — you can’t merge the contents if two people changed it, and diffs generally aren’t helpful. The file is meant to be consumed by a machine. In essence, you want to treat it like a binary file.</p>
</blockquote></p>
<p style="font-size: 20px;">关于iOS 核心数据 :"Data Model Version Compiler" error,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/24901548/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/24901548/
</a>
</p>
页:
[1]