iOS CoreData:“Data Model Version Compiler”错误 [英] iOS CoreData: "Data Model Version Compiler" error

查看:182
本文介绍了iOS CoreData:“Data Model Version Compiler”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中创建了一个数据模型文件ChatModel.xcdatamodeld。然后我合并了github上的分支。 project.pbxproj中存在冲突。我固定他们。然后发生错误:

I created a data model file "ChatModel.xcdatamodeld" in my project. Then I merged branches on github. There're conflicts in "project.pbxproj". I fixed them. Then the error happened:


/ Users / mac / zhongqing-ios / Zhongqing / Zhongqing / Model / ChatModel.xcdatamodeld:无法创建/Users/mac/Library/Developer/Xcode/DerivedData/Zhongqing-chngcirectbawjenegkxtgdfgoux/Build/Products/Debug-iphonesimulator/Zhongqing.app/ChatModel.momd'上的版本模型的捆绑文件夹。

"/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'".

/ Users / mac / zhongqing-ios / Zhongqing / ChatModel.xcdatamodeld:无法在'/ Users / mac / Library / Developer / Xcode / DerivedData / Zhongqing-chngcirectbawjenegkxtgdfgoux中为版本化模型编写VersionInfo.plist /Build/Products/Debug-iphonesimulator/Zhongqing.app/ChatModel.momd'。

"/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'".

每次我必须删除Derived数据使项目可以运行。
然后错误再次出现。

Each time I have to delete the Derived Data so that the project can be run. And then the error happen again.

推荐答案

虽然一些文件是可读的,但应该被视为二进制文件。 .pbxproj 文件就是一个很好的例子。

Although some files are readable they should be treated like binary files. .pbxprojfiles are good example.

pro-git


一些文件看起来像文本文件,但对于所有意图和目的都被视为二进制数据。例如,Mac上的Xcode项目包含以.pbxproj结尾的文件,它基本上是由IDE写入磁盘的JSON(纯文本javascript数据格式)数据集,记录您的构建设置等。虽然它在技术上是一个文本文件,因为它是所有的ASCII,你不想这样处理它,因为它是一个轻量级的数据库 - 如果两个人改变它不能合并的内容,差异通常是没有什么帮助。该文件旨在由机器使用。实质上,你想把它看成一个二进制文件。

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.

这篇关于iOS CoreData:“Data Model Version Compiler”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆