title: How to get Media Item from Asset Url
body: <p>Have asset url stored as NSstring, how to get MediaItem corresponding to the url from itunes media library. </p>
  
  <p>Using following code</p>
  
  <pre><code>@objc func getMyMediaItem(SongUrl:NSString)-&gt;Void{
  
      let query = MPMediaQuery.songsQuery();        
      let urlQuery = MPMediaPropertyPredicate(value:SongUrl,forProperty: MPMediaItemPropertyAssetURL,comparisonType: .EqualTo);
      query.addFilterPredicate(urlQuery);
      let mediaItem = query.items! as [MPMediaItem]; 
  
    }
  </code></pre>
  
  <p>But mediaItem is always returning 0 items.</p>