This is solved, but I can’t mark it as such for 2 days.
This seems pretty basic. I’ve got a date coming from my server, mapping it to an NSDate, it picks it up and goes to map it and it SKIPS it!
restkit.object_mapping:RKObjectMappingOperation.m:263 Mapping attribute value keyPath 'createdOn' to 'createdOn'
restkit.object_mapping:RKObjectMappingOperation.m:125 Found transformable value at keyPath 'createdOn'. Transforming from type '__NSCFString' to 'NSDate'
restkit.object_mapping:RKObjectMappingOperation.m:109 Transforming string value '2012-03-20T13:20:19.910Z' to NSDate...
restkit.object_mapping:RKObjectMappingOperation.m:280 Skipped mapping of attribute value from keyPath 'createdOn to keyPath 'createdOn' -- value is unchanged ((null))
So later on, of course, my object has a nil for the NSDate.
I even tried putting in a default global formatter with this:
[RKObjectMapping addDefaultDateFormatterForString:@"yyyy-MM-dd'T'HH:mm:ss.sss'Z'" inTimeZone:nil];
One problem I can see is that my date is formatted like this: 2012-03-20T13:20:19.910Z — notice the decimal seconds. I had hoped the above format would fix that.
How can I get RestKit to map my object?
The solution is:
notice the decimal seconds are SSS not sss.