title: NSUrlDomainError code -1002 "unsupported URL"
body: <p>I am trying to use <a href="https://github.com/vitoziv/VIMediaCache" rel="nofollow noreferrer">this</a> library to enable caching my videos. And I receive this error:</p>
  
  <blockquote>
    <p>Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSLocalizedDescription=unsupported URL, NSErrorFailingURLStringKey=4185c72c-252e-4019-8c1c-e30b4ccbe597/, NSErrorFailingURLKey=4185c72c-252e-4019-8c1c-e30b4ccbe597/, _NSURLErrorRelatedURLSessionTaskErrorKey=(
        "LocalDataTask &lt;85069315-C50B-404F-86D8-548ED16B9103>.&lt;1></p>
  </blockquote>
  
  <p>The code that is causing this problem is:</p>
  
  <pre><code>  VIResourceLoaderManager *resourceLoaderManager = [VIResourceLoaderManager new];
    self.resourceLoaderManager = resourceLoaderManager;
    AVPlayerItem *playerItem = [resourceLoaderManager playerItemWithURL:url];
    return [self initWithPlayerItem:playerItem frameUpdater:frameUpdater];
  }
  </code></pre>
  
  <p>However if I remove the lines added for this library to work, then it works perfectly( without caching ) like this:</p>
  
  <pre><code>AVPlayerItem* item = [AVPlayerItem playerItemWithURL:url];
  return [self initWithPlayerItem:item frameUpdater:frameUpdater];
  </code></pre>
  
  <p>The url in question is <code>https://firebasestorage.googleapis.com/v0/b/app_domain/o/ed8f47cc-e9ee-43d0-848e-06edaaeaab70.mp4?alt=media&amp;token=4185c72c-252e-4019-8c1c-e30b4ccbe597</code></p>
  
  <p>I have changed the url a little bit for security. But it plays in browser and as I said it works well without the caching code.</p>