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
download
v1.32: Wed Jan 30 2019-
[NEW] Support for URL and UUID property types (Trevor Squires, original PR)
-
[NEW] Add support for "Uses Scalar Type" (Rok Gregorič, original PR)
-
[NEW] Add Swift generic
fetchRequest()
to generated code (0xpablo, original PR) -
[NEW] Add nullability annotations for generated primitive accessors of optional, to-one relationships. (Michael Babin, original PR)
-
[NEW] Expose allAttributes and allRelationships (Trevor Squires, original PR)
-
[NEW] Add template booleans to identify custom attribute type use. (Aleksandar Vacić, original PR)
-
[NEW] Support "Custom Class" for Transformable attributes (Tomek Cejner, commit)
-
[NEW] Add parameter to ignore entities (Martin Kim Dung-Pham, original PR)
-
[CHANGE] Use
Data
instead ofNSData
with Swift (Christopher Rogers, original PR) -
[CHANGE] Dropped
.pkg
binary releases. mac OS 10.14 Mojave won't install unsigned pkgs by default any more, and I'm not paying Apple $100/year so I can distribute open source binaries. Use Homebrew to install and update mogenerator binaries. (rentzsch) -
[CHANGE] Travis updates (Trevor Squires, commit, commit)
-
[FIX] Correct Swift machine template for singleton (fetchOne…) fetch request results. (Warren Burton, original PR)
Further history is listed in the Version History file.