title: how to resolve when MPMediaItem assetURL is nil?
body: <p>I'm working on code that looks at the user's videos and passes them along to AVPlayer by way of an AVPlayerItem which takes a URL.</p>
  
  <p>To get all the videos on an iOS device, you can do:</p>
  
  <pre><code>let videoNumber = MPMediaType.anyVideo.rawValue
  let predicate = MPMediaPropertyPredicate.init(value: videoNumber, forProperty: MPMediaItemPropertyMediaType)
  let query = MPMediaQuery.init()
  query.addFilterPredicate(predicate)
  
  if let items = query.items
  {
      mediaCollection = MPMediaItemCollection(items: items)
  
      // -1 would indicate an error condition
      print("number of items in collection is \(mediaCollection?.count ?? -1)")
  }
  </code></pre>
  
  <p>When you select the MPMediaItem you want to use from the <code>items</code> array, there should be an <code>assetURL</code> to go with it.</p>
  
  <p>Trouble is, on my device, all of my <code>assetURL</code> properties are NULL.  Coincidentally, while <code>hasProtectedAsset</code> for each of these items is <code>false</code>, <code>isCloudItem</code> for each of these items is <code>true</code>.  </p>
  
  <p>How can I come up with a valid <code>assetURL</code> that I can pass along to any media player?  It feels somewhat bogus that developers can't get proper references &amp; access to media in a user's iPod library.  </p>