Strip Accents and Diacritics in Objective-C

I don’t know how many times I’ve needed to remove accents and diacritics from a string and gone about it in very wrong way. It’s so easy I’m surprised I’ve never come across it before.

NSMutableString *string = [@"Énġlišh låcks iñterêsţing diaçrïtičş" 
    mutableCopy];
CFStringTransform((__bridge CFMutableStringRef)(string),
	NULL, kCFStringTransformStripCombiningMarks, NO);

This and more is demonstrated in the WWDC 2013 Hidden Gems in Cocoa and Cocoa Touch video (Developer login required). You should also be reading all the great articles over at NSHipster.com.