title: How to convert MIME type to preferred filename extension on iOS?
body: <p>I have a MIME type: audio/x-wav</p>
  
  <p>I want the preferred filename extension: .wav</p>
  
  <p>Is there a way to obtain this information on iOS?</p>
  
  <p>I have tried...</p>
  
  <pre><code>CFStringRef uttype = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, @"audio/x-wav", NULL);
  CFStringRef utpt = UTTypeCopyPreferredTagWithClass(uttype, kUTTagClassFilenameExtension);
  </code></pre>
  
  <p>...but the value of 'uttype' returned is prefixed with "dyn" (indicates type-not-found according to the docs) and 'utpt' is therefore NULL.</p>