Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

core-data

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?

like image 634
eonil Avatar asked Dec 27 '22 18:12

eonil


1 Answers

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

like image 96
Ben Dolman Avatar answered Feb 12 '23 10:02

Ben Dolman