 <p>I'm not sure if this will solve your problem, but don't use == for string comparisons. Use the <code>compare:</code> method of the <code>NSString</code> class.</p> <pre><code>if ([myNSStringObject compare:anotherNSStringObject] == NSOrderedSame) { //proceed with processing based on resultant matched strings } else { //proceed with processing based on resultant non-matched strings } </code></pre> <p>Not sure if this will make a difference, but as your program becomes more complex, you might run into trouble not doing it this way.</p>