I have a custom class, which is a subclass of NSManagedObject. I would like to store it in a dictionary, but when trying to do so I receive a Property list in
NSManagedObject
Property list in
A swift version in case anyone needs it
import CoreData extension NSManagedObject { func toDict() -> [String:Any] { let keys = Array(entity.attributesByName.keys) return dictionaryWithValues(forKeys:keys) } }