Search code examples
objective-cxcodecore-datamogenerator

How do I use MOgenerator's xmod?


I just installed MOgenerator 1.21 for use with Xcode 3.2.5 (on an iOS project if that's relevant).

I can run the mogenerator command from the terminal fine. But I can't seem to have xmod work.

mdfind reports xmod is :

/Developer/Library/Xcode/Plug-ins/Xmod.pbplugin

So it looks like it's installed correctly. I also quitted and restarted Xcode.

As documented (included in a very similar question that left me puzzled), I added "xmod" to the comment pane in my xcdatamodel info page, as illustrated in the following image:

the comment on this window reads "xmod" http://emberapp.com/jdmuys/images/untitled/sizes/m.png

Now, whether I build my project, modify my xcdatamodel or both, nothing new happens: no file is generated, nor added to my project, no new output is in my build log.

So how am I supposed to "launch" xmod? Is xmod supposed to let me know somehow that it ran? Where should I look? Is it supposed to appear in a new build phase?

I am puzzled and I'm not sure what to try.

Thanks.


Solution

  • I added a second line to the comment pane, with the --output-dir parameter. The comment pane now reads:

    xmod
    --output-dir MOs
    

    And now it starts working: it generates the files and they show up in the Xcode project.

    Why wasn't that explained anywhere? No idea...