title: Unzip the zip file saved into the app in xcode with swift 5.0
body: <p>I have saved one zip file in my app, which is having .json files in it.
  I have to unzip this zip file at some path and read the file after unzip.</p>
  
  <p>I tried using package managers like <a href="https://github.com/weichsel/ZIPFoundationhttps://" rel="nofollow noreferrer">ZipFoundation</a></p>
  
  <p>If I run the app on my mac with OS 10.15.2 (macOS Catalina) I get the following output </p>
  
  <pre><code>"Extraction of ZIP archive failed with error:Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “directory” in the folder “Macintosh HD”." UserInfo={NSFilePath=/directory, NSUnderlyingError=0x600002f39530 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}"
  </code></pre>
  
  <p>if I run the app on device (iPhone XS Max iOS 13.3.1) I get the following error,</p>
  
  <pre><code>Extraction of ZIP archive failed with error:Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “directory” in the folder “System@snap-8290536”." UserInfo={NSFilePath=/directory, NSUnderlyingError=0x2811d54d0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>import ZIPFoundation
  
  
  func unarchiveFile(){
      let fileManager = FileManager()
      let currentWorkingPath = fileManager.currentDirectoryPath
      var sourceURL = URL(fileURLWithPath: "/Users/sagarchavan/Documents/Project/Swift-POC/iOS-CD-POCs/CDSwiftDemo/")
      //var sourceURL = URL(fileURLWithPath:currentWorkingPath)
      sourceURL.appendPathComponent("countryList.zip")
      print("source url is :- :\(sourceURL)")
      var destinationURL = URL(fileURLWithPath: currentWorkingPath)
      destinationURL.appendPathComponent("directory")
      print("destinationURL is :- :\(destinationURL)")
      do {
          try fileManager.createDirectory(at: destinationURL, withIntermediateDirectories: true, attributes: nil)
          try fileManager.unzipItem(at: sourceURL, to: destinationURL)
      } catch {
          print("Extraction of ZIP archive failed with error:\(error)")
      }
  }
  </code></pre>
  
  <p>Can you please help me out to get out from this issue.
  I need to unzip the zip file.</p>
  
  <p>for <code>sourceURL</code> I tried both, by giving <code>currentWorkingPath</code> and by giving actual path to file. but both the time i get same error.</p>
  
  <p>@note :- I don't want to use any pods or Carthage. I want default code or external dependancies are from package managers only.</p>
  
  <p>Any help will be appreciated.
  Thank you.</p>