How to extract and create a zip file using swift 4 for Mac OS application ?

Hi there. I am facing problem in extracting a zip file in my mac os appliaction project. I have downloaded the zip file to the disk from server API.

let destinationDir = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
                let destination = destinationDir.appendingPathComponent("SomeFileName.zip")
                try data!.write(to: destination)

Now i want to extract that file there and want to read the contains including directories and files. Is there any third paarty library available in swift for this ?

I also want to create a zip file too so that i will upload that to server after making changes to it.

For folks reading along at home, see this thread for context.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
How to extract and create a zip file using swift 4 for Mac OS application ?
 
 
Q