I’m having some troubles trying to save a singleton object to the iPhone disk.
The object is a collection of 2 arrays, which contain the faved posts and faced jobs.
Basically –> Favorites = arrayOfFavedPosts + arrayOfFavedJobs
Now I am trying to save the Favorites object, so that the once faved posts or jobs can be read from the disk.
Error:
2012-04-26 14:56:56.957 FirstDesign_test2[666:10403] -[Post encodeWithCoder:]: unrecognized selector sent to instance 0x6c74a80
This error fires up when I call the saveToDisk method when I add a new object to one of the arrays…
Some help would be really appreciated!
Thanks in Advance
You need to adopt and implement the
NSCodingprotocol on yourPostclass (and presumably on yourJobclass).NSCoding Protocol Reference
Archives and Serializations Programming Guide: Encoding and Decoding Objects