core-datareverse-engineering

Reverse engineer Core Data 'mom' file


Is there any way to reverse engineer a Core Data 'mom' file (compiled core data model)?


Solution

  • There is a way to do this easily.

    You can import a compiled datamodel file (.mom) into a model design document (.xcdatamodel) using Xcode > Design > Data Model > Import. This will effectively allow you to 'reverse engineer', if you wish, the compiled mom file and inspect it's model.

    Edit:

    In the Xcode 5 and later, the menu is under Editor->Import. But this menu will only appear when you click the .xcdatamodel