To solve this, include a line like this that is called anytime before the unarchiving happens:
[NSKeyedUnarchiver setClass:[Model class] forClassName:@"ControlViewModel"];
You might even want to put this in the +(void)initialize method of the class in question. Just make sure to load it.
Now, unless you're out of your mind, you wouldn't base an entire app's storage paradigm on NSKeyedArchiver, but just in case you have done that, it's pretty flexible.
No comments:
Post a Comment