title: Storing custom objects with Core Data
body: <p>I'm trying to store a NSMutableArray consisting of VOs (NameVO) with Core Data but getting the following exception thrown:</p>
  
  <pre><code>'NSInvalidArgumentException', reason: '-[NameVO encodeWithCoder:]: unrecognized selector sent to instance 0x1096400a0'
  </code></pre>
  
  <p>My NameVO is just a simple value object, extending NSObject and contains two fields, a string and a NSMutableArray that itself contains strings. It also contains a compare function.</p>
  
  <p>I'm trying to prepare this to be stored as a CD transformable attribute type with ('names' is my NameVO array):</p>
  
  <pre><code>NSData *tempNamesData = [NSKeyedArchiver archivedDataWithRootObject:names];
  </code></pre>
  
  <p>My question is: what do I need to do to make NameVO be accepted by NSKeyedArchiver to convert it successfully to a NSData?</p>
  
  <p>I don't want NameVO to extend NSManagedObject because then I cannot instantiate and init it directly.</p>