title: Can't put a NSString into a NSMutableArray and store it in NSUserDefaults
body: <p>I am receiving this error: '-[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'</p>
  
  <p>In the ViewDidLoad I initialized my array:</p>
  
  <pre><code>id object = [[NSUserDefaults standardUserDefaults] objectForKey:@"array"];
  
      if (object) 
      {
          locationArray = object;
          NSLog(@"retrieved", object);
      }
      else 
      {
          locationArray = [[NSMutableArray alloc] init];
          NSLog(@"init");
      }
  </code></pre>
  
  <p>Then, I am trying to add the data to locationArray:</p>
  
  <pre><code>            ABMultiValueRef multi = ABRecordCopyValue(person, property);
              NSUserDefaults *locatie = [NSUserDefaults standardUserDefaults];
  
              // Set up an NSArray and copy the values in.
              NSArray *theArray = [(id)ABMultiValueCopyArrayOfAllValues(multi) autorelease];
              //everything goes fine the first time, but the second time i receive an error after at this code:
              [locationArray addObject:theArray];
  
              [locatie setObject:locationArray forKey:@"array"];
  </code></pre>
  
  <p>Every first time I select an address everything is fine. But every second time I am receiving that error.
  What did I do wrong?</p>