title: The operation couldn’t be completed. (Cocoa error 1560.)
body: <p>i am using core data in my application.</p>
  
  <p>i am getting this error when using transformable attribute to store NSArray.</p>
  
  <p>in short i want to know, what should i do to store NSArray into core data.</p>
  
  <p>and how to retrive it.</p>
  
  <p>this is my code.</p>
  
  <pre><code>#import &lt;CoreData/CoreData.h&gt;
  
  @class category;
  
  @interface qrandom :  NSManagedObject  
  {
  }
  
  @property (nonatomic, retain) NSArray* arr;
  @property (nonatomic, retain) category * cid;
  
  @end
  </code></pre>
  
  <p>...........................................................................................</p>
  
  <pre><code>#import "qrandom.h"
  
  #import "category.h"
  
  @implementation qrandom 
  
  @dynamic arr;
  @dynamic cid;
  
  @end
  </code></pre>
  
  <p>...................................................................</p>
  
  <p>category.h file</p>
  
  <pre><code>#import &lt;CoreData/CoreData.h&gt;
  
  @class qrandom;
  
  @interface category :  NSManagedObject  
  {
  }
  @property (nonatomic, retain) NSNumber * cid;
  @property (nonatomic, retain) qrandom * randomrelation;
  
  @end
  </code></pre>
  
  <p>....................................................................................</p>
  
  <p>category.m file</p>
  
  <pre><code>#import "category.h"
  #import "qrandom.h"
  
  @implementation category
  
  @dynamic cid;
  @dynamic randomrelation;
  
  @end
  </code></pre>
  
  <p>................................................................................</p>
  
  <p><img src="https://i.stack.imgur.com/A7OLN.png" alt="enter image description here"></p>