hello:
Can someone tell me why I am getting a crash when saving a date attribute in Core Data:
Unacceptable type of value for attribute: property = "date"; desired type = NSDate; given type = NSDate; value = NSDate.
let date = NSDate()
. . .
let groupObject = NSEntityDescription.insertNewObject(forEntityName: "GroupRecord", into: managedContext)
groupObject.setValue(NSDate.self, forKeyPath: "date")// crash occurs here
do {
try managedContext.save()