Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

How do I get the folder of the unzipped archive with ZipFoundation

As the title says, how do I get the unarchived folder from a zip folder extracted with ZipFoundation? I want to show the extracted file/folder with the click of button ("Show in Finder") ...
Chucky's user avatar
  • 404
2 votes
1 answer
276 views

Zip files of a Directory without any root folder

I want to zip files inside a folder in my iOS application written in the Swift language. I am using ZipFoundation CocoaPod of version 0.9.5. let fileManager = FileManager.default guard let sourceURL ...
Vivek's user avatar
  • 100
0 votes
1 answer
111 views

What is the most efficient way to validate a compressed ZIP file when using ZIPFoundation

ZIPFoundation Is there a method similar to validate that can be used for this purpose? A method looks like this: func validateZipFile(at zipFileURL: URL) -> Bool { guard let archive = Archive(...
Dikey's user avatar
  • 121
0 votes
1 answer
666 views

How to print progress with ZIPFoundation

How can I track and print progress percentage to console on each progress update using ZIPFoundation in a class file that is not a controller? I am quite new to swift and I have been trying to ...
AleXiuS's user avatar
  • 830
1 vote
1 answer
770 views

Swift ZIPFoundation extract string in memory is not working

I am using ZipFoundation in Swift from https://github.com/weichsel/ZIPFoundation My requirement is unzip the file contents in memory and directly convert into String. let archive = Archive(url: ...
Kiran's user avatar
  • 1,195
0 votes
1 answer
923 views

How can I increase the speed of unzipping files using ZIPFoundation?

I am downloading a .zip file containing a 3D model with textures using Alamofire. The file size is currently 20mb. After using ZIPFoundation, the time it takes to unzip the file is ~50s. The ...
sptrad's user avatar
  • 69
1 vote
1 answer
1k views

ZipFoundation cannot unarchive the file because it can't be found

I'm trying to unzip some archives in a macOS app using the ZipFoundation library. The files are located on the desktop, I've confirmed the paths are correct and that the file exists. I have this code: ...
PruitIgoe's user avatar
  • 6,394
1 vote
1 answer
949 views

Extract directory entry from archive

Is it possible to extract a directory entry from an archive? How can I do it? Code to extract a file.txt from the archive: let fileManager = FileManager() let currentWorkingPath = fileManager....
luhahaha's user avatar
  • 125
1 vote
1 answer
5k views

Unzip the zip file saved into the app in xcode with swift 5.0

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. I tried using package managers like ZipFoundation If ...
Sagar's user avatar
  • 1,304
0 votes
1 answer
282 views

In memory archive with ZipFoundation

As stated on the link https://github.com/weichsel/ZIPFoundation#in-memory-archives, it should be possible to create in memory archive, still I am unable to find appropriate init method of the Archive ...
Borko4vp's user avatar
5 votes
0 answers
4k views

Swift - zip/unzip Data in memory without any file system interaction

My code needs to parse heaps of JSON files, and those files are hosted on GitHub and only available bundled as 1 single ZIP file. Because the ZIP file is only about 80 MB, I want to keep the entire ...
Wowbagger and his liquid lunch's user avatar
0 votes
1 answer
65 views

Can a ZipFoundation Archive be sent as data in a mail attachment?

I need to zip up some logs and send them as a mail attachment MFMailComposeViewController has a method for attachments func addAttachmentData(_ attachment: Data, mimeType: String, fileName filename: ...
Fraser's user avatar
  • 998
1 vote
1 answer
1k views

Importing ZipFoundation in Xcode using Carthage not working

I followed all the steps to import Zipfoundation in my project using Carthage but it doesn't work. I can import Alamofire without issues using Carthage so I am guessing the first steps are right. ...
STerrier's user avatar
  • 4,025
2 votes
1 answer
434 views

Using ZIPFoundation without URL

In my MacOS app I am downloading an encrypted .zip file to the disk. I decrypt this file and keep the decrypted version in memory in the Data type. For security reasons the decrypted .zip will only be ...
Anddev's user avatar
  • 195
2 votes
0 answers
247 views

FileManager and accessing app group error

I've been having problem with using share extension to get a file and unzip it into my app group folder. Here is the code: for attachment in content.attachments as! [NSItemProvider] { if ...
Mininny's user avatar
  • 85

15 30 50 per page