title: Error Code 513 : you don't have permission to access "Documents"
body: <p>hello I using NSUelSession to download large files and inside my didFinishDownloadingToUrl in some Devices randomly I am get this error</p>
  
  <blockquote>
    <p>Error Code 513 : you don't have permission to access "Documents"</p>
  </blockquote>
  
  <p>when I am trying to move the file to document directory . I can't re-produce this error on my actual device when connected to Xcode how ever this happened on random devices running iOS 13 and 12. what is the problem?
  this is my saveFile function</p>
  
  <pre><code>func saveFile(location : URL , fileName : String) {
      let documentsPath = NSURL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0])
  
      let savedURL = documentsPath.appendingPathComponent(fileName)
  
      do {
  
          try self.fileManager.moveItem(atPath: location.relativePath , toPath: savedURL!.relativePath)
  
      }
      catch let error as NSError {
  
          print("Ooops! Something went wrong: \(error)")
  
          do {
             SCLAlertView().showError("File Not Saved", subTitle: "Error Code \. (error.code) : \(error.localizedDescription)")
  
             try  fileManager.removeItem(at: location)
          }
          catch {
             print(error.localizedDescription)
          }
      }  
  }
  </code></pre>