title: Failed to determine whether URL is managed by a file provider
body: <p>Since two days I have this problem </p>
  
  <p>I tried a lot, </p>
  
  <p><a href="https://stackoverflow.com/a/51764198/10392572">https://stackoverflow.com/a/51764198/10392572</a></p>
  
  <p><a href="https://stackoverflow.com/a/46457518/10392572">https://stackoverflow.com/a/46457518/10392572</a></p>
  
  <p><a href="https://stackoverflow.com/a/51218715/10392572">https://stackoverflow.com/a/51218715/10392572</a></p>
  
  <p>If I'm right, UIActivityViewController need an array of url(s) of the file(s) and documentInteractionController need an url and both ask user what he want do, but every time, if the user use "save to file" I have:</p>
  
  <blockquote>
    <p>[default] [ERROR] Failed to determine whether URL /Users/lukashedinger/Library/Developer/CoreSimulator/Devices/45A185C5-6DEA-4A52-B415-939758FB7F7E/data/Containers/Data/Application/D4E32740-958D-43A6-BEC1-EECEB8CF732D/tmp/Vitalstoffwerte 22092018-22092018.pdf (n) is managed by a file provider </p>
  </blockquote>
  
  <p>Anyone have idea if there is other way to ask user, where he want save a file or what I can do with my error?</p>
  
  <p>Her is my code in short, perhaps something is wrong?</p>
  
  <pre><code>    let dateiName = "Vitalstoffwerte " + heuteString
      let path = "\(NSTemporaryDirectory())\(dateiName).pdf"
  
      pdfData.write( toFile: path, atomically: true)
  
      let fileUrl: URL = URL(fileURLWithPath: path)
      let activityViewController = UIActivityViewController(activityItems: [fileUrl], applicationActivities: nil)
      activityViewController.popoverPresentationController?.sourceView = self.view
      self.present(activityViewController, animated: true, completion: nil)
  </code></pre>
  
  <p>------- UPDATE : Found a way for my problem, but not for file -----</p>
  
  <p>I've given the pdfData direct to ViewController, haven't saved it to file. </p>
  
  <p>UIActivityViewController(activityItems: [pdfData], applicationActivities: nil)</p>
  
  <p>I'm not using a file and that is good enough for me</p>
  
  <p>-- UPDATE --</p>
  
  <p>My new idea is that first try to save the file and try it's URL, and if this fails, then use the pdfData directly, because in some simulator using URL gives no error and in other gives error.</p>
  
  <p>More here: <a href="https://stackoverflow.com/a/52499637/10392572">https://stackoverflow.com/a/52499637/10392572</a>    </p>