Skip to content

Releases: lucasmedeirosleite/EasyMapping

0.18.0

01 Jul 15:35
Compare
Choose a tag to compare

New

  • All API was annotated for nullability, allowing better interoperability with Swift
  • Added mapPropertiesFromUnderscoreToCamelCase: method on EKObjectMapping, that allows mapping underscored JSON keypaths to camel-cased properties.

For example:

[mapping mapPropertiesFromUnderscoreToCamelCase:@[@"created_at",@"car_id"]];

will map created_at and car_id keypaths to createdAt and carId properties in your model.

Fixed

  • When using mapKeyPath:toProperty:withValueBlock: method and ignoreMissingFields property on EKObjectMapping is set to YES, value block will no longer be called, if value in JSON is nil

Deprecations

  • NSDateFormatter extension with ek_formatterForCurrentThread is deprecated and slated to be removed in release for Xcode 8, which drops support for iOS 7 and lower. This property is no longer useful, because NSDateFormatter is thread safe from iOS 7 and higher, and there's no reason to store NSDateFormatter in thread dictionary anymore.

Removals

Following deprecated methods were removed:

  • serializedObject on EKManagedObjectModel. Use serializedObjectInContext: instead.
  • mapKeyPath:toProperty:withDateFormat: method on EKObjectMapping. Use mapKeyPath:toProperty:withDateFormatter: method instead.

0.17.0

30 May 15:57
Compare
Choose a tag to compare

Changed

  • Improved CoreData importer perfomance by using NSMutableSet instead of NSSet copies(thanks, @adrian-gierakowski)

0.16.0

01 Mar 17:00
Compare
Choose a tag to compare

Added

  • ignoresMissingFields property on EKObjectMapping, that allows skipping nil or NSNull values when mapping to object. Defaults to NO.

0.15.3

25 Sep 11:56
Compare
Choose a tag to compare

Fixes

  • Better Carthage/ObjectiveC++ support

0.15.0

06 Jun 20:53
Compare
Choose a tag to compare

Features

Introduced new property on EKObjectMapping - respectPropertyFoundationTypes.

When set to YES, your class will be introspected in mapping process, and mapper will try to create objects, that have the same type, as your properties. For example, you might have a NSSet property, that you want to create from JSON array.

Supported types: NSMutableArray, NSMutableDictionary, NSSet, NSOrderedSet, NSMutableSet, NSMutableOrderedSet.

Due to perfomance reasons, this behaviour is turned off by default.

Bugfixes

  • Prevent crash, that could happen, when JSON array contained null objects(@kolyuchiy in a623bd7)

0.14.2

12 May 16:22
Compare
Choose a tag to compare

Changes

  • Nullability annotations were removed

0.14.1

24 Apr 12:47
Compare
Choose a tag to compare

Changes

  • Added support for Carthage! 👍
  • Nullability annotations has been slightly adjusted for EasyMapping blocks and should be more friendly to autocomplete( at least AppCode's autocomplete, but hopefully to XCode's too, when Apple fixes nullability bugs, that exist in XCode 6.3)

0.14.0

09 Apr 07:50
Compare
Choose a tag to compare

Changes

  • Dropped support for XCode 6.2 and lower

0.13.0

14 Mar 13:25
Compare
Choose a tag to compare

Enhancements

  • Added nullability annotations for XCode 6.3 and Swift 1.2. Annotations should be backwards compatible with previous XCode releases.

Fixes

  • Fixes a bug, that could prevent NSDate property to be updated from new representation, if JSON contained null value

0.12.3

26 Feb 12:21
Compare
Choose a tag to compare

Changes

  • EKManagedObjectModel serializedObject method is deprecated, please use serializedObjectInContext: instead.