pod 'ZCSFileExtensionForMimeType', '~> 0.0.1'
#import "ZCSFileExtensionForMimeType.h"
// Somewhere you've already gotten a mime_type for your file.
NSString *mime_type = @"audio/mp4";
// Now you want the correct file extension. Save your file at a path
// terminated with this extension so iOS won't crap the bed sometimes.
NSString *file_extension = [ZCSFileExtensionForMimeType extensionForMimeType:mime_type];
Send me Pull Requests here, please.