There should be more code for your code than you prove, but the following works fine:
NSString *parms = @"Mike Hat"; NSString *newVar =[parms stringByReplacingOccurrencesOfString:@"'" withString:@""]; NSLog(@"%@",newVar);
Exit: Mikes Hat
Perhaps there is a possibility that the character ' may not be the same character in your parms string if the above does not work for you.
Turns out you're using the wrong character, copy / paste this character into the string: '
source share