Changelog History
-
v1.32 Changes
January 31, 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)
-
v1.31 Changes
October 03, 2016- π [NEW] Swift 3 support. (Goncharov Vladimir, Hardik, rentzsch)
- [CHANGE] Add nullability to the primitive value. (Tom Carey)
- [CHANGE] Allow for nullable collection properties. (Ibrahim Sha'ath)
- [CHANGE] Mark
+entityInManagedObjectContext:
nullable. (Ibrahim Sha'ath) - β‘οΈ [DOC] Update link to Apple's Core Data Programming Guide. (Brian Schrader)
- [FIX] Syntax error in Objective-C templates. (Dave Wood)
- β [TEST] Add Parent.orderedChildren ordered relationship. (rentzsch)
-
v1.30.1 Changes
April 07, 2016- [FIX] Use
will
/didChange
&will
/didAccess
in generated code when usingscalarsWhenNonOptional
. (rentzsch) - π [FIX] Only use
@import
if supported (which Objective-C++ does not). issue 325 (Samuel Bichsel) - [FIX] Add space between property type and name. issue 323 (Daniel RodrΓguez TroitiΓ±o)
- [FIX] Use
-
v1.30 Changes
March 22, 2016π Thanks to lieutenant Justin Williams for helping with this release.
- [NEW] Official bundled Swift 2 templates. (Justin Williams 1 2)
- 0οΈβ£ [NEW] "Modern" Objective-C and Swift is default. Apple has made it exceptionally difficult to target older versions of OS X and iOS, so we've given up. The grand
--v2
experiment, which I loved, has been killed (the option will still be accepted to not break existing scripts but is now a no-op). From now on if you need to target an older OS, use an older mogenerator. Sorry. (Justin Williams) - [NEW] Generate Objective-C Lightweight Generics. (rentzsch)
- [NEW] Generate
instancetype
. (Justin Williams) - [NEW] Generate nullability attributes for Objective-C machine templates (
NS_ASSUME_NONNULL_BEGIN
/nullable
). (Justin Williams) - π [NEW] mogenerator project is now using Travis CI. Travis automatically builds and runs mogenerator's test suite on each commit, reporting the results, making it easier+faster to process Pull Requests. (rentzsch)
- π€ [NEW] Change of branch philosophy: master used to be the "stable" branch. Now it's the branch we're going to land incoming Pull Requests. Pull Requests will be accepted onto master pretty freely, Travis will help catch breaking changes. I want to reduce latency and friction for folks to help out with mogenerator. Related reading: Drew Crawford's Conduct unbecoming of a hacker. (rentzsch)
- [NEW] Specifying
--template-var scalarsWhenNonOptional=true
will have mogenerator generate only scalar properties for non-optional entity scalar attributes. For example, consider anage
attribute. Without this option, mogenerator will generate two properties:@property (β¦) NSNumber *age
and@property (β¦) uint16_t ageValue
. With this option, only@property (β¦) uint16_t age
would be generated, simplifying things since the age attribute can never benil
. (Mr Anonymous) - π [CHANGE] Replace Mike Ash-style constant structures in favor of more ARC-friendly NSObject subclasses. Should be source-compatible with with Mike Ash-style. (Justin Williams)
- π [FIX] You can specify an entity's module in Xcode's Core Data Model editor. However, when specifying the current module, the entity class name is prefixed with a period, resulting in an invalid class name. This period is now suppressed. (Saul Mora)
- [FIX] momcom:
NSPropertyDescription
'soptional
wasn't being set correctly. issue 286 (Matthias Bauch) - 0οΈβ£ [FIX] override and explicitly include
xcshareddata
in.gitignore
and add the default shared schemes. This fixes the problem wherexcodebuild
would fail with anThe project 'mogenerator' does not contain a scheme named 'mogenerator'
error until you first opened it in Xcode. (rentzsch) - [FIX] Generated indentation. (Markus Chmelar 1 2)
- [FIX] Use
DERIVED_FILE_DIR
instead ofTMPDIR
. (Jonathan MacMillan) - π [CHANGE] Move the constant structures to the end of the machine header file. It's just uninteresting support code. (rentzsch)
- [MODERNIZE] MiscMerge: switch to Objective-C Modules. (Justin Williams)
- [MODERNIZE] Use instancetype internally. (Justin Williams)
- [MODERNIZE] 64-bit only. (Justin Williams)
- [MODERNIZE] Replace
nsenumerate
macro withfor...in
. (Justin Williams) - [MODERNIZE] MiscMerge: encode all source files as UTF8. (Justin Williams)
- π [MODERNIZE] Set minimum deployment target to 10.8. (Justin Williams)
- [MODERNIZE] Replace RegexKitLite with NSRegularExpression. (Justin Williams)
- [MODERNIZE] Replace
arrayWithObjects
anddictionaryWithObjectsAndKeys
with literals. (Markus Chmelar 1 2) - [MODERNIZE] Replace
objectAtIndex:0
withfirstObject
. (Markus Chmelar) - π [REMOVED] //validate machine comments. They were just guides on writing your own validation methods and aren't worth the code clutter. (Justin Williams)
- π [REMOVED] Xmo'd. It hasn't worked for a very long time and I have no immediate plans on putting in the time to get working again. (Justin Williams)
-
v1.29 Changes
August 20, 2015π Much thanks to lieutenants Tom Harrington and Justin Williams for handling this release.
- [NEW] Use built-in model compiler (momcom) instead of relying on Xcode's
momc
. (Tom Harrington) - π [NEW] Documentation generation using User Info keys. (Daniel Tull)
- π [NEW] Multiuser support (use per-user
$TMPDIR
instead of/tmp
). (Annard Brouwer) - π [NEW] Swift: support for additionalHeaderFileName. (Leonardo Yvens)
- [CHANGE] Swift: make generated machine classes and their attributes public. (Fritz Anderson)
- [CHANGE] Swift: make initializers public. (Dave Reed)
- [CHANGE] Swift: make enums public. (Dave Reed)
- [CHANGE] Swift: make mogenerator:readonly work for Swift by rendering the attribute as a read-only computed property. (Tom Harrington)
- [CHANGE] Swift: method signatures for validate methods. issue 281. (Tom Harrington)
- [FIX] Don't generate
-primativeType
and-setPrimativeType:
. issue 202. (rentzsch) - [FIX] Swift: ordered relationships. issue 290. (Oleksii Taran, Tom Burns)
- [FIX] Swift: model specified fetch requests. (Dave Reed, Tom Harrington)
- β [FIX] Swift: MogenSwiftTest. (Justin Williams, Dave Reed)
- [FIX] Swift: generation of
override
method declarations. (Tom Harrington 1, 2) - β [FIX] Quote paths in test/Rakefile. (Jonah Williams)
- [NEW] Use built-in model compiler (momcom) instead of relying on Xcode's
-
v1.28 Changes
September 11, 20140οΈβ£ [NEW]
--v2
argument. I wanted to enable ARC by default, but decided to take it a step further (while not breaking existing scripts). The new--v2
argument is basically semantic versioning for tool arguments.So now instead of this:
mogenerator --model MyDataModel.xcdatamodeld \ --template-var arc=true \ --template-var literals=true \ --template-var modules=true
You can write this:
mogenerator --v2 --model MyDataModel.xcdatamodeld
Internally these invocations are equivalent, but new scripts and manual invocations should use the
--v2
variant.I recommend putting the
--v2
in front of the rest of the arguments to call attention to the versioned context of the following arguments.0οΈβ£ This mechanism should allow mogenerator to continue to supply sensible defaults into the future as well. Perhaps
--v3
will generate Swift by default. Speaking of whichβ¦[NEW] Experimental Swift code generation. Unfortunately basic Core Data functionality (to-one relationships) is broken on 10.9, but we can still try writing theoretically-correct Swift code. Perhaps a future version of mogenerator will supply the needed work-around code for you. (Alexsander Akers, afrederick1, Piet Brauer, rentzsch, Chris Weber, Markus Chmelar, Brent Royal-Gordon)
β [NEW] Ordered relationships actually work. OMG. I have them working in a new separate OS X test app, even though mogenerator's test dir fails. I still haven't figured out why, but I'm not holding this back. (Daniel Tull, Joshua Greene, Dave Wood, Jonathan del Strother)
π [NEW] Custom scalar types. Specify
attributeValueScalarType
for the name of the property's custom type andadditionalHeaderFileName
if you need to bring in an additional header file for compilation. With this, mogenerator supports C-style and JREnum-style enums. (Quentin ARNAULT)π [NEW] Remove unnecessary empty lines in the generated files. (Stephan Michels)
[NEW] Ability to forward-declare
@protocol
s for i.e. transformable types. Specify them via a comma delimited string in the entity's user info under theattributeTransformableProtocols
key. (Renaud Tircher)[NEW] Generate
*UserInfo
key/value pairs as const structs. (Jeremy Foo, rentzsch)[NEW]
--template-var literals
which, when enabled, generates Obj-C literals. (Brandon Williams, Thomas van der Heijden, rentzsch)β [NEW] Specify
--template-var modules=true
option to avoidtreating #import as an import of module 'CoreData' [-Wauto-import]" warning
. (Daniel Tull)[NEW] Unsigned integers are generated when a property's minimum is set to
0
in the Xcode modeler. (Dan Pourhadi)π [NEW] Add support for setting command-line options via a JSON config file. (Simon Whitaker)
[NEW] Add CONTRIBUTING.md file. It's now even easier to contribute to mogenerator :) (rentzsch)
[NEW] Add MIT LICENSE file to make it clear templates are under the same license. (rentzsch)
[CHANGE] Suppress generation of
-setPrimativeType:
method. issue 16. (rentzsch)β [CHANGE] Add a warning when skipping an attribute named 'type'. (Simon Whitaker)
[CHANGE] Add explicit
atomic
to sooth-Weverything
. (Daniel Tull)β‘οΈ [CHANGE] iOS 8 changes objectID from a getter into a property, resulting in a warning. Templates updated to match. (Ryan Johnson)
π [FIX] Support newly-created models when
--model=*.xcdatamodeld
. issue 137. (Sergey)β [FIX] Minor warning fix, 64->32 truncation, format strings. (Sean M)
[FIX] Machine headers always
#import
s their superentity if present. (David Aspinall)[FIX] Fetch requests whose predicate LHS specifies a relationship. issue 15. (rentzsch)
[FIX] Don't emit empty
*UserInfo
structs. (Jeremy Foo 1 2)[FIX] Don't emit empty
*Attributes
,*Relationships
, and*FetchedProperties
structs. (Daniel Tull)[FIX] MOIDs subclass their superentity (instead of just always inheriting from
NSManagedObject
). (Daniel Tull)[FIX] Don't touch aggregate include files if the content didn't change. (Stephan Michels)
[FIX] Don't attempt to
#import "NSManagedObject.h"
even in the face of weird (corrupted?) model files. issue 42. (rentzsch)π [TEST] Escape spaces in mogenerator build path. (Daniel Tull)
-
v1.27
November 14, 2012 -
v1.26
April 13, 2012 -
v1.25
February 17, 2012 -
v1.24
December 08, 2011