 <p>Answer by Firo is correct. Only change required is the syntax used to set/replaced object in NSMutableArray. <br><br> Correct syntax is : <br></p> <pre><code>[yourMutableArray replaceObjectAtIndex:i withObject: [[NSString alloc] initWithData:[yourMutableArray objectAtIndex:i] encoding:NSASCIIStringEncoding]; </code></pre>