I have a CoreData model installed in the xcdatamodel file.
My YYYY attribute has a transformable type, and I set the name tranformer in the data model inspector.
In my case, I saved [CLLocation]in my model.
class LocationArrayTransformer : NSValueTransformer {
override func transformedValue(value: AnyObject?) -> AnyObject? {
let locations = value as! [CLLocation]
return NSKeyedArchiver.archivedDataWithRootObject(locations)
}
override func reverseTransformedValue(value: AnyObject?) -> AnyObject? {
let data = value as! NSData
return NSKeyedUnarchiver.unarchiveObjectWithData(data)
}
}
This is my value transformer.
But for some reason, I still get a warning in the console: No NSValueTransformer with class name XXX was found for attribute YYYY on entity ZZZZ
Any idea why?
source
share