Sam Hitz
Sam Hitz

Reputation: 65

NSValidationDateTooLateError in core data, but date is actually completely normal

I've encountered an NSValidationDateTooLateError error, when inserting a date in a sqlite database using core data. Here is a sample error description I get

NSValidationErrorKey=lastModified, NSLocalizedDescription=The operation couldn't be completed. (Cocoa error 1630.), NSValidationErrorValue=2011-09-07 22:00:00 +0000}

but as you can see, the value it wants to insert is completely in range and correct. The thing is that I used this update routine in production and it worked flawlessly. I can't imagine a reason why this error should come up. I didn't set any min or max date value in my core data model.

Help is much appreciated.

Upvotes: 1

Views: 111

Answers (1)

Tomer Even
Tomer Even

Reputation: 4980

Its a bug in Xcode Just delete the problematic attribute from the model and add it back again. Dont forget to delete the App from the simulator before launching it again.

Upvotes: 2

Related Questions