MoGen does not give an error message when -- options are incorrectly coded #172

LostInTheTrees opened this Issue Aug 22, 2013 · 4 comments


None yet
3 participants

Edit: See my last comment for the resolution of my original problem. One of my dashes was a long dash not a regular dash. MoGen did not give an error message, which took me a full day to find.

This is probably my own problem, but I haven't been able to figure out another way to contact you. My build phase command line is this currently:

mogenerator –-template-var arc=true -m PT1/Data/DataModel.xcdatamodeld -O PT1/Data

Files are generated, but it seems to be ignoring the ARC flag. I have tried variations on this line, but I always get this in my machine files:

extern const struct BillingAccountAttributes {
NSString *accountActive;
} BillingAccountAttributes;

This gives an ARC error. I do not know what it is supposed to generate for ARC, except I found one mention on StackOverflow of __unsafe_unretained in front of the entries in the struct.

I have looked for some indication or output from Mogen in the XCode build log and don't anything that shows what option it thinks are accepted. I also tried redirecting stdout from MoGen and didn't see anything there. What might I be doing wrong?

It may be relevant that I am on XCode 5 and iOS7, but I don't see how exactly.

Thanks for your work on this.


When you download XCode 5, it installs as I still have Does MoGen install stuff inside XCode (and not XCode5-DP5)? If so, could this be the reason I cannot get an ARC legal file out of MoGen?

I also tried using MoGen from the command line and got the same results.


I have resolved my issue, but it creates a true issue for MoGen. In this blog post, which was otherwise a great help,, I copied the command line into XCode. Something had changed "--" into a long dash. Even after I added a second dash it did not work because one of my dashes was a long dash and I could not tell visually. I even copied my command line into a terminal window and so I had the same result. The blog post has already been corrected.

I would have been spared this if MoGen produced an error when it found the long dash in the command line instead of ignoring it. I suggest you make this change.


rentzsch commented Jun 26, 2014

I agree it would be nice. Would love a patch to ddcli that errored-out on such arguments.

@rentzsch rentzsch added the bluesky label Jun 26, 2014


justin commented Mar 22, 2016

We are declaring pull request and issue 0 now that 1.3 is out. If this is still an issue you'd like to see address with 1.30 and going forward, please open a new issue so we can start a fresh discussion. Thank you!

@justin justin closed this Mar 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment