title: Get video NSData from ALAsset url iOS
body: <p>I am not able to retrieve NSData from the url that I get from ALAsset</p>
  
  <p>Below is the code I tried:- I always get NSData as nil.</p>
  
  <pre><code> NSData *webData = [NSData dataWithContentsOfURL:[asset defaultRepresentation].url];
  </code></pre>
  
  <p>I also tried something like this</p>
  
  <pre><code> NSData *webData1 = [NSData dataWithContentsOfURL:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]]];
  </code></pre>
  
  <p>The url that I get from the ALAsset:-</p>
  
  <p>assets-library://asset/asset.MOV?id=1000000116&amp;ext=MOV</p>
  
  <p>I have tried this below link which works but I need to unnecessary write to a temp location which is very time consuming.</p>
  
  <p><a href="https://stackoverflow.com/questions/4545982/getting-video-from-alasset">Getting video from ALAsset</a></p>
  
  <p>Any hint in right direction would be highly appreciated.</p>
  
  <p>Waiting for your replies</p>