Cant decode ChecklistItem

Hello!

Has anyone else bumped into this exception…

Terminating app due to uncaught exception ‘NSInvalidUnarchiveOperationException’, reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (Checklists.ChecklistItem)

I encountered it on page 151 iOS Apprentice(Tables), after you add a TableViewController to implement multiple lists. I know that the Checklist object can be decoded. I’ve run the app multiple times and the data from the previous sessions persists.

Anyone know the cause of this?
Thank you!

Try throwing away the Checklists.plist file and run the app again a few times. Does the error persist?

Hah! It works now
Can you give a clue as to why?
Thank you sir!

It’s explained a few times in the tutorial. :smiley: But what probably happened is that a version of Checklists.plist got saved, then you changed something in the code that makes the new code incompatible with the way the old Checklists.plist was saved, and then the app crashes.

good to know, thanks again! :vulcan: