Unzip files in swift

后端 未结 5 747
一整个雨季
一整个雨季 2020-12-16 04:22

How to go about unzipping a file in swift? In Objective-C, I used SSZipArchive and I loved it. As seen in the code below. I suspect if I decide to keep SSZipArchive, I will

5条回答
  •  萌比男神i
    2020-12-16 04:59

    Swift 2 (Update):

    So it works for me without Errors:

    1. download/clone the Library here: ssziparchive
    2. copy the Directory "SSZipArchive" to your Project (Drag&Drop) and select 'Create groups'
    3. include the library to your Project Swift-ObjC Bridge (xxxx-Bridge-Header.h)

      #import "SSZipArchive.h"

    4. link the Library "libz.tbd" - Part of iOS

      (Project -> Build Phases -> Link Binary With Libraries -> +)

    5. Ready to zip/unzip

提交回复
热议问题