Possible Duplicate:
Storing custom objects in an NSMutableArray in NSUserDefaults
How to store custom objects in NSUserDefaults
I tried to store an object instantiated from a class I wrote called "Animal" in an NSMutableArray to be stored in NSUserDefaults. However, I get this error.
[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value '(
"<Animal: 0xcea7060>"
)' of class '__NSArrayM'. Note that dictionaries and arrays in property lists must also contain only property values.
What does this mean? Perhaps I cannot store objects in NSMutableArrays to be stored in NSUserDefaults?