Mogenerator and Swift

2k views Asked by At

The Mogenerator GitHub page suggests that the latest version can generate Swift code. Can anyone tell me what flag I need to pass on the command line to trigger this feature. The ReadMe doesn't seem to say, and all of the other relevant documentation I've found on the web pre-dates the release of Swift. Here's the command I'm using at the moment (it produces Objective-C), what do I need to add?

mogenerator --v2 --model TagField/TagField.xcdatamodeld -O TagField/Model
1

There are 1 answers

2
Martin R On BEST ANSWER

From

DDGetoptOption optionTable[] = 
{
    // Long                 Short  Argument options
    {@"v2",                 '2',   DDGetoptNoArgument},
    {@"model",              'm',   DDGetoptRequiredArgument},
    ...
    {@"swift",              'S',   DDGetoptNoArgument},
    {nil,                   0,     0},
};

in https://github.com/rentzsch/mogenerator/blob/master/mogenerator.m I assume that

mogenerator --swift ...

should to the trick.