title: iphone xcode; mutableCopy still immutable?
body: <p>i have looked all over the place regarding this problem. All i am trying to do is, create a nsuser defaults object, then add a mutable array to it and try to modify the nsuserdefaults object.</p>
  
  <pre><code>//Created a sample array
  NSMutableArray *xml=[[NSMutableArray alloc] init];
  [xml addObject:@"x"];
  [xml addObject:@"x"];
  [xml addObject:@"x"];
  [xml addObject:@"x"];
  [xml addObject:@"x"];
  //assigned to defaults object which is created previously with a mutableCopy
  [defaults  setObject:[xml mutableCopy] forKey:@"userLocationsDetailedXML"]; 
  //Tried to modify the defaults object - which at this point should be mutable
  [[defaults objectForKey:@"userLocationsDetailedXML" ] replaceObjectAtIndex:1 withObject:@"y"] ;
  </code></pre>
  
  <p>Adding <code>[defaults synchronize]</code> does'nt help either.        </p>
  
  <p>But surprisingly the defaults object is still immutable. It is __NSCFArray, not __NSCFArrayM as expected
  Any suggestions?</p>
  
  <p>edit: console output
  Class : __NSCFArray => SHould'nt it be _<em>NSCFArrayM since i created a mutable copy?
  [</em>_NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object'</p>