If you're storing image data in Core Data you should think about ticking the 'allow external storage' option.
The value transformer you want is to convert NSString
to NSData
and you need to base64 in the middle. You need to create a class which conforms to < RKValueTransforming >
. Because you are transforming from NSString
you should implement validateTransformationFromClass:toClass:
so you can reject any transformation where the destination isn't NSData
efficiently.
Once you have created your class and in instance of it (imageFormatter
), install it with:
[[RKValueTransformer defaultValueTransformer] insertValueTransformer:imageFormatter atIndex:0];
and the same process applies for the date formatter.