title: How to get the file name of an AVURLAsset?
body: <p>I obtain the URL of an AVURLAsset like this:</p>
  
  <pre><code>NSURL *url = [[asset defaultRepresentation] url];
  </code></pre>
  
  <p>In console, the AVURLAsset's url looks like this:</p>
  
  <blockquote>
    <p>assets-library://asset/asset.mov?id=A3210417-4BAC-1C78-BD93-4BDD286247D9&amp;ext=mov</p>
  </blockquote>
  
  <p>I tried getting file name with extension from URL like this:</p>
  
  <pre><code>NSString *last = [[url URLByDeletingPathExtension] lastPathComponent];
  NSString *tnFileName = [NSString stringWithFormat:@"%@_tn.%@", last, url.pathExtension];
  </code></pre>
  
  <p>Here is console log of tnFileName:</p>
  
  <blockquote>
    <p>tnFileName = asset_tn.mov</p>
  </blockquote>
  
  <p>How can I get a string of the A3210417-4BAC-1C78-BD93-4BDD286247D9 portion? Or is there a different unique ID for an asset to use for caching still images of the asset?</p>
  
  <p>To clarify, I need this to store thumbnails to disk and I want to use a name that matches the asset.</p>