I've downloaded a copy of iOS source code and there is a .mom file in the bundle. I just know it is a "product" of NSManagedObjectModel. I wonder is there any way that I can explore the entities in the file, or is there any code snippet to parse its structure. Thank you!
How to open an existing .mom file, or is there any way to see the structure of an existing .mom file
8.6k views Asked by Harvey At
4
There are 4 answers
0
On
Use the managed object model decompiler [full disclosure: I wrote it] to convert the .mom back into a .xcdatamodel. Then open the result in Xcode.
0
On
As mentioned by @max in this answer it is a binary plist file. So I tried to convert it to a XML file using this command :
plutil -convert xml1 myfile.mom -o myfile.xml
then you can simply open the file by a text editor.
What you can do is add that .mom file which is the core data model to your project and you will be able to explore its entities and attributes.