title: How to get MIME type for image or video in iOS 8 using PHAsset?
body: <p>I am using PHAsset in my application where I need to upload image and video to api, for that I need mime type of image and video. In previous version of iOS I was using following code but in iOS 8 I don't know how to get mimetype I have tried looking into apple PHAsset programming guide but unable to find it.</p>
  
  <pre><code>ALAssetRepresentation *representation = [asset defaultRepresentation];
  NSString *mimeType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass
          ((__bridge CFStringRef)[representation UTI], kUTTagClassMIMEType);
  </code></pre>
  
  <p>Looking for any guidance. </p>