title: Saving a NSMutableArray using NSUserDefaults not working
body: <p>I have this mutable array named myWallet with its property declaration:</p>
  
  <pre><code>@property (nonatomic, strong) NSMutableArray *myWallet;
  </code></pre>
  
  <p>This array is being filled up by Cards, which is an object. I create a new instance of a Card from another View Controller so I use a delegate method in able to pass this created card on my initial View Controller which is a Table View Controller. Below is the delegate method</p>
  
  <pre><code>- (void)addCardViewController:(AddCardViewController *)sender didCreateCard:(Card *)newCard
  {
      // insert a new card
  
      self.myCard = newCard;
      [self.myWallet addObject:self.myCard];
  
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>So far, I can create new instances of Card, and when I do, a new table cell appears in my initial view controller (Card Wallet VC).</p>
  
  <p>What I want is when the user is done using the app, the created instance(s) of Card he / she previously created still appears on next run time of the app. So I used NSUserDefaults to do this. The method below is how I'm using NSUserDefaults to save.</p>
  
  <pre><code>- (void)saveMyWallet
  {
  
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  
      [defaults setObject:self.myWallet forKey:@"myWalletArray"];
  
      [defaults synchronize];
      NSLog(@"I am saved");
  }
  </code></pre>
  
  <p>I call this method inside the didSelectRowAtIndexPath. When I run the app, then create a new instance of a Card, click the table cell, this appears on my log.</p>
  
  <pre><code>2012-05-04 14:51:00.900 CardWallet[24998:f803] *** -[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value '("&lt;Card: 0x6aa02f0&gt;")' of class '__NSArrayM'.  
  Note that dictionaries and arrays in property lists must also contain only property values.
  </code></pre>
  
  <p>What could be a possible reason to this? And can you suggest me ways I can go about it. </p>
  
  <p>Thanks in advance.</p>