什么是Core Data的.omo文件?需要吗? [英] What's Core Data's .omo file? Is it required?

查看:108
本文介绍了什么是Core Data的.omo文件?需要吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译Core Data模型时,我得到了.mom,.omo和versioninfo文件。 .mom看起来像托管对象模型文件。什么是.omo文件?我不知道。尤其是当我想为iOS创建静态库时,如果我也嵌入omo文件,那会令人困惑。而且Xcode无法识别数据模型包。我必须将它们作为文件基础。什么是.omo文件?

When I compile Core Data model, I get .mom, .omo and versioninfo file. .mom looks like Managed Object Model file. And what's .omo file? I have no idea. Especially when I want to make a static lib for iOS, it's confusing should I embed the omo file too. And Xcode doesn't recognize the data model bundle. I have to bed them as file basis. What is the .omo file?

推荐答案

今年在WWDC上,我与实验室的Core Data工程师进行了交谈,他们告诉我 .omo 文件只是 .mom 文件的优化版本。 .mom 文件是二进制plist,而 .omo 是另一种格式,加载速度更快。

At WWDC this year I talked to the Core Data engineers in the labs and they told me that the .omo file is just an optimized version of the .mom file. The .mom file is a binary plist while the .omo is some other sort of format that's faster to load.

他们告诉我,您可以安全地删除 .omo 文件,而Core Data会从速度稍慢的位置加载, .mom 文件代替。他们告诉我,这样做只会导致额外的几毫秒的加载时间(这引出了为什么他们首先要费心优化它的问题)。

They told me that you could safely remove the .omo file and Core Data would load from the—slightly slower—.mom file instead. They told me that doing so would only result in an additional few milliseconds of load time (which begs the question of why they bothered to optimize it in the first place).

这篇关于什么是Core Data的.omo文件?需要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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