Mantle Changelog

What's new in Mantle 2.1.0

Oct 14, 2016
  • watchOS support (@ikesyo in #730)
  • tvOS support (@ikesyo in #731)
  • Xcode 8 support (@dcaunt in #758)
  • Added implicit NSUUID JSON value transformer (@conraddev in #723)
  • Also includes documentation improvements thanks to @getaaron and @bruun. Thanks to @ikesyo for Xcode/Travis maintenance.

New in Mantle 2.0.7 (Apr 16, 2016)

  • MTLJSONAdapter correctly checks for MTLModel protocol conformance rather than MTLModel inheritance @startupthekid in #617, @priteshshah1983 in #631)
  • Improved error descriptions when serializing models from JSON fails (@kypselia in #661)
  • Add predefined NSDate, NSNumber and NSFormatter value transformer factory methods (@conradev in #641)
  • Fix Swift deprecation warnings (@msanders in #680)
  • Apply default MTLJSONAdapter type transformer for a key when using JSONTransformerForKey: if no custom transformer is returned (@k06a in #685)

New in Mantle 2.0.5 (Oct 12, 2015)

  • Implicitly transform properties for types conforming to MTLJSONSerializing (@younthu in #605)

New in Mantle 2.0.4 (Aug 13, 2015)

  • Fixed an issue with recursive definitions (@jmah in #582)

New in Mantle 2.0.2 (May 25, 2015)

  • #525 fixes a memory management crash introduced in #520.

New in Mantle 2.0 (Apr 2, 2015)

  • This release of Mantle contains major breaking changes that we were unable to make after freezing the 1.0 API. The changes in 2.0 focus on simplifying concepts and increasing flexibility in the framework.

New in Mantle 2.0 Beta 1 (Mar 18, 2015)

  • ADDITIONS AND IMPROVEMENTS:
  • MTLModel protocol:
  • The new protocol represents the basic behaviors expected from any model object, and can be used instead of the MTLModel class when inheritance is impossible, or to create more generic APIs.
  • For example, conformance can be added to the objects from other persistence frameworks in order to use those objects in conjunction with Mantle’s adapters.
  • Accordingly, MTLJSONAdapter has been updated to only depend on conformance, and no longer requires a MTLModel subclass in order to serialize or deserialize from JSON.
  • Error handling for value transformers:
  • The new protocol can be used to add error reporting behaviors to any NSValueTransformer.
  • MTLValueTransformer has been updated to take advantage of the new interface, with the following new methods that provide error information:
  • +transformerUsingForwardBlock:
  • +transformerUsingReversibleBlock:
  • +transformerUsingForwardBlock:reverseBlock:
  • Similarly, the predefined transformers that Mantle provides now provide error information upon failure as well.
  • Storage behaviors for properties:
  • The new +storageBehaviorForPropertyWithKey: method can be used to redefine the default behavior of methods like -dictionaryValue, -isEqual:, -description, and -copy all at once.
  • Properties which have been omitted from +propertyKeys by default will continue to be omitted under the new API, with a default behavior of MTLPropertyStorageNone.
  • Type checking during JSON parsing:
  • MTLJSONAdapter now implicitly validates the type of values assigned to your objects during JSON parsing.
  • This can be prevent errors like an NSString being assigned to a BOOL property.
  • This is only a simple safety check, though, and cannot catch every kind of error! Continue to verify that your types align ahead of time.

New in Mantle 1.5.4 (Jan 17, 2015)

  • Pacify Xcode (#437).

New in Mantle 1.5.3 (Dec 30, 2014)

  • Updates the dependencies’ folder structure, and moves stuff into Cartfile.private for Carthage 0.5.

New in Mantle 1.5.2 (Dec 30, 2014)

  • Adds support for Xcode 6 and Carthage.

New in Mantle 1.5.1 (Oct 8, 2014)

  • Ordered Core Data relationships will now be serialized into NSOrderedSet
  • Illegal mappings in +JSONKeyPathsByPropertyKey now throw an exception

New in Mantle 1.5 (May 15, 2014)

  • Convenience methods on arrays of models, various fixes