*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PeopleData initWithCoder:]: unrecognized selector sent to instance 0x6888c10'
I’ll try to make it simple. How does this line:
NSData* objData = [NSKeyedArchiver archivedDataWithRootObject:[newStorage yourStaticArray]];
Knows in what class to look for the NSCode? Right now I’m getting the error above because it is searching for the NSCode in the wrong place.
In the class PeopleData there’s nothing but properties.
When you archive or unarchive an object, at that time
initWithCoderorencodeWithCoderis called.Please implement NSCoding in
PeopleDataclassFor tutorial about
NSCoding. Here is the good tutorial.