for (name, attr) in newManagedObject.entity.attributesByName {
let attrType = attr.attributeType // NSAttributeType enumeration for the property type
let attrClass = attr.attributeValueClassName ?? "unknown"
print(name, "=", newManagedObject.valueForKey(name), "type =", attrClass)
}