mogenerator

How do the Mogenerator parameters work, which can I send via Xcode? [closed]

久未见 提交于 2020-01-10 06:13:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . The help for Mogenerator is very minimal. What do all the parameters do? 回答1: Parameters that work both via the command line utility and Xcode: --base-class : The name af the base class which the "private class" (e.g. _MyObject.h ) will inherit from. This will also add an import

Integrate mogenerator within Xcode 4

可紊 提交于 2020-01-01 11:38:08
问题 In my application I'm using Core Data stuff to enable persistent data saving. Since I've seen that mogenerator provides a good approach to create and maintain NSManagedObject subclasses (also with additional functionalities), I'm looking for some tips for integrating monogenerator within Xcode 4? P.S. The question has been submitted based on share your knowledge, Q&A-style. 回答1: For Xcode 4.5+, the easiest way is to setup a "Pre-action" in your scheme: Edit the scheme you want to build Open

Mogenerator Assertion failed: (momcTool && “momc not found”), function -[MOGeneratorApp setModel:]

此生再无相见时 提交于 2019-12-25 12:46:13
问题 I can't get Mogenerator 1.27 to generate the NSManagedObject classes as I'm getting this error: Assertion failed: (momcTool && "momc not found"), function -[MOGeneratorApp setModel:], file /tmp/mogenerator-LDeD/mogenerator-1.27/mogenerator.m, line 643. Abort trap: 6 I'm using this command: mogenerator -m myApp/myModel.xcdatamodeld/myModel.xcdatamodel -O myApp/Model --template-var arc=true The exact same command works on my old computer, but not on my new one with the same version of

How do I use Mogenerator?

懵懂的女人 提交于 2019-12-18 12:55:18
问题 I installed Mogenerator. Now what do I do? How do I use it? The first problem I have is that I have no idea where it was installed to. During the install process, it only let me select the hard drive to install it on, not the directory. The most natural location would be the Applications folder, but it isn't there. Next, the readme (which I found online) states: Xmo'd works by noticing when your *.xcdatamodel is saved. If the model file's Xcode project item comment contains xmod, an

What features does mogenerator provide?

筅森魡賤 提交于 2019-12-18 10:54:27
问题 I've been using mogenerator for a while now, and while there is a reasonable Getting Started Guide and a Stack Exchange article on the command line options, I haven't found a good guide for all of the functionality it provides. In short: what, above and beyond the classes that Core Data provides for you, what does mogenerator actually generate? (Frankly, I kept finding little pleasant surprises in the headers/implementations that I didn't realize were in there and I decided to step through

iOS CoreData+MoGenerator: How do I initialize a Managed Object once only when I am using nested contexts?

。_饼干妹妹 提交于 2019-12-13 05:16:47
问题 I am using mogenerator to generate code from a model with a TestPerson managed object. TestPerson inherits from the abstract object TLSyncParent. In TLSyncParent I have the code: - (void) awakeFromInsert { [super awakeFromInsert]; QNSLOG(@"%@\n%@", self.managedObjectContext, self.description); if (self.syncStatus == nil) { self.syncStatusValue = SYNCSTATUS_NEW; self.tempObjectPID = [self generateUUID]; QNSLOG(@"After init values\n%@", self.description); } } I create the TestPerson object in

Mogenerator and ARC in XCode 4.6

大憨熊 提交于 2019-12-13 04:29:31
问题 I am just getting started with integrating mogenerator into an app project with Core Data, per recommendations as a best practice. I added the following build script, with a flag to support ARC. mogenerator -m FavesDataModel.xcdatamodeld/FavesDataModel.xcdatamodel --template-var arc=true The script successfully builds all the necessary classes and subclasses. At that time, I copied all the generated files into my project. Initially, I got a clean successful build. However, when trying another

Access to extern const struct from Swift

℡╲_俬逩灬. 提交于 2019-12-12 05:29:32
问题 I can't access a c-struct from Swift, which was generated with Mogenerator. The struct is in the implementation: const struct MyAttributes MyAttributes = { .foo = @"foo", }; And then in the header: extern const struct MyAttributes { __unsafe_unretained NSString *foo; } MyAttributes; I added the header import to the bridging header. But I can't access the struct from Swift. With Objective C I can. I thought maybe Swift needs the struct declaration as it is in the implementation file, so I

Overriding insertInManagedObjectContext: will have no effects on child entities in mogenerator : why and how to do?

非 Y 不嫁゛ 提交于 2019-12-12 05:03:17
问题 In the methods insertInManagedObjectContext: provided by mogenerator , there is no call to any super methods. I wonder why. Indeed, Imagine I have two entities : ParentEntity and ChildEntity ; of course, ParentEntity is the parent entity of ChildEntity . Then, I override the insertInManagedObjectContext: of the ParentEntity . But then, when I create a ChildEntity , none of my changes will be taken in account !! I was wondering why such a choice and maybe a solution. My need is to create a

The entity (null) is not key value coding-compliant for the key “title”

痞子三分冷 提交于 2019-12-10 15:09:59
问题 I'm trying to get RestKit and CoreData to work together. I'm getting closer, but I'm getting the following error: CoreData: error: Failed to call designated initializer on NSManagedObject class 'Book' *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Book 0x8454560> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key "title".' It seems to me that it's finding my Book class successfully, and it DOES have a title property. What