title: Swift: UIDocumentInteractionController is not working?
body: <p>UIDocumentInteractionController is not working with large pdf files with multiple pages.</p>
  
  <p>Here in my code, </p>
  
  <pre><code>      var docController:UIDocumentInteractionController!
  </code></pre>
  
  <p>...</p>
  
  <pre><code>    DispatchQueue.main.async (execute: { [weak self] in
  
              self?.docController = UIDocumentInteractionController(url: pdfFileURL!)
              self?.docController.delegate = self
              self?.docController.name = pdfFileURL?.lastPathComponent
              self?.docController.presentPreview(animated: true)
      })
  </code></pre>
  
  <p>and delegate method,</p>
  
  <pre><code>func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -&gt; UIViewController {
      return self
  }
  </code></pre>
  
  <p>This is the warning in console,</p>
  
  <blockquote>
    <p>2017-05-26 12:46:51.178894 MyApp [3350:1136818] [default] View service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote</p>
  </blockquote>
  
  <p>Below attached is the blank image,</p>
  
  <p><a href="https://i.stack.imgur.com/vi8sC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vi8sC.png" alt="enter image description here"></a></p>
  
  <p>Please help me out thanks.</p>