title: How to play Apple Music files (even "available offline" ones) with AVPlayer?
body: <p>Is it possible to play Apple Music files—even the "available offline" ones—with AVPlayer? I've tried the following code to retrieve the URL, but it returns nil:</p>
  
  <pre><code>- (void)mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection{
      [mediaPicker dismissViewControllerAnimated:YES completion:nil];
  
      NSURL *thisURL=[[[mediaItemCollection items] firstObject] valueForProperty:MPMediaItemPropertyAssetURL];
  ...
  </code></pre>
  
  <p>Thanks for reading.</p>
  
  <p>EDIT:
  <a href="https://forums.developer.apple.com/thread/3720" rel="noreferrer">Discussions</a> on the Apple Developer forum suggest this may not be possible, unless AVPlayer is <em>not</em> used. But then that prevents audio processing, so not an option unfortunately.</p>