Core Data Save Error (NSValidationErrorKey, Cocoa error 1570) saving NSDate

The cocoa error 1570 means that mandatory fields are not filled in.
In this case, your have two attribues that are nil : Voedsel and datum.

I see in your code :

newDaglijst.Voedsel = geselecteerdVoedsel;
newDaglijst.datum = selDatum;

Check that geselecteerdVoedsel and selDatum are not nil or that they are overreleased and finish to be nil.
If they are optional data (but I don’t think so), define them as optional in coredata.

Hope this help,

Leave a Comment