Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cocoa Kucha Berlin 2013

Cocoa Kucha Berlin 2013

My talk on "What's new in Mantle 2.0" for the Cocoa Kucha 2013 Berlin.

B00d4ed5d1e6cb9fc840167820247515?s=128

Robert Böhnke

January 22, 2014
Tweet

Transcript

  1. MANTLE2.0 WHAT’S NEW IN ✉ robb@robb.is @ceterum_CENSEO

  2. @interface GHIssue : MTLModel
 <MTLJSONSerializing>
 
 @property (readonly, copy) NSURL

    *URL; @property (readonly, copy) NSData *updatedAt;
 
 @end
  3. [MTLJSONAdapter modelOfClass:GHIssue.class fromDictionary:dictionary error:&error];

  4. #1 GOODBYE GITHUB.com/github Issue #200 [DONE]

  5. github.com/mantleframework Issue #200 [DONE]

  6. #2 EXPLICIT PROPERTY MAPPING Issue #149 [merged]

  7. // 1.x
 + (NSDictionary *)JSONKeyPathsByPropertyKey {
 return @{ @"userID": @"id",

    @"cacheKey": NSNull.null // implicit: // @"username": @"username" }; } Issue #149 [merged]
  8. // 2.0
 + (NSDictionary *)JSONKeyPathsByPropertyKey {
 return @{ @"userID": @"id",

    @"username": @"username" }; } Issue #149 [merged]
  9. @property (…) NSString *id @property (…) NSString *profile_url Issue #149

    [merged]
  10. #3 TRANSFORMER ERROR HANDLING Issue #153 [merged]

  11. Issue #153 [merged] @protocol <MTLTransformerErrorHandling> ! - (id)transformedValue:(id)value success:(BOOL *)success

    error:(NSError **)error; ! @end
  12. #4 AuTOMATIC VALUE TRANSFORMERS Issue #188 [WIP]

  13. Issue #188 [WIP] kCFBooleanTrue != @YES

  14. Issue #188 [WIP] -[MTLJSONAdapter
 transformerForModelPropertiesOfClass:] ! -[MTLJSONAdapter
 transformerForModelPropertiesOfObjCType:]

  15. #5 PROPERTY STORAGE BEHAVIOR* Issue #210 [WIP]

  16. Issue #210 [WIP] -[MTLModel description] -[MTLModel isEqual:] -[MTLModel dictionaryValue]

  17. #6 Longer-lived adapters Issue #151 [WIP]

  18. Issue #151 [WIP] ?

  19. questions?
 File A RADAR Issue

  20. THANKS!