What's Core Data's .omo file? Is it required?

这一生的挚爱 提交于 2020-01-14 19:14:29

问题


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?


回答1:


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.

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).




回答2:


In my case, the omo file was generated when I specified RenamingID for one entity relationship. The worst thing that I link to this file was that I lost the ability to use lightweight database migration later even for simple database changes.



来源:https://stackoverflow.com/questions/12136253/whats-core-datas-omo-file-is-it-required

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!