// convert to a data object, using a lossy conversion to ASCII
NSData *asciiEncoded = [yourOriginalString dataUsingEncoding:NSASCIIStringEncoding
allowLossyConversion:YES];
// take the data object and recreate a string using the lossy conversion
NSString *other = [[NSString alloc] initWithData:asciiEncoded
encoding:NSASCIIStringEncoding];
// relinquish ownership
[other autorelease];
which will remove all the accents..To remove all spaces
NSString *yourFinalString = [other stringByReplacingOccurrencesOfString:@" " withString:@""];
First part of removing accent, code copied from dreamlax's answer in this thread..