Skip to content

rentzsch/mogenerator

Repository files navigation

mogenerator

Visit the project's pretty homepage.

Here's mogenerator's elevator pitch:

mogenerator is a command-line tool that, given an .xcdatamodel file, will generate two classes per entity. The first class, _MyEntity, is intended solely for machine consumption and will be continuously overwritten to stay in sync with your data model. The second class, MyEntity, subclasses _MyEntity, won't ever be overwritten and is a great place to put your custom logic.

Want more detail? John Blanco has authored a detailed writeup about mogenerator.

Using mogenerator

Senseful wrote up a nice summary of mogenerator's command-line options.

Version History

v1.33: Date TBD

  • [NEW] Update Swift templates for better Swift style (Aleksandar Vacić)

  • [FIX] Fixed invalid call of NSManagedObject.fetchRequest() (Vincent Esche)

  • [NEW] Add support for URI and UUID attribute types (Trevor Squires)

  • [NEW] Expose information when custom type is set through userInfo (Aleksandar Vacić)

  • [CHANGE] Nullability annotations for generated primitive accessors (Michael Babin)

  • [FIX] Support for “Uses Scalar Type” (Rok Gregorič)

  • [FIX] Swift 3 NSData to Data (Christopher Rogers)

  • [FIX] Add specialized fetchRequest() func to Swift's machine generated files (0xpablo)

  • [FIX] Correct Swift machine template for singleton (fetchOne…) fetch request results (Warren Burton)

  • [FIX] Expose allAttributes and allRelationships (Trevor Squires)

v1.32: Wed Jan 30 2019 download

Further history is listed in the Version History file.