Unzip files in swift

后端 未结 5 760
一整个雨季
一整个雨季 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条回答
  •  不知归路
    2020-12-16 04:57

    @screenworker (Unome) asked about a rash of errors that all make reference to the libz framework. I ran into something similar. The link step produced errors concerning "symbols" such as "_crc32". All these symbols could be found in the libz.tbd stub.

    The issue in this case is that I had mistakenly added the libz.tbd reference to the Test target, not the Target named for the project itself. This can be checked by going to the Build Phases display:

    • In the Project Navigator (left panel) click on your project name
    • In the editor, click on the "Build Phases" tab.
    • In the Build Phases display, look for a list entitled Targets in a narrow column adjacent to the Project Navigator
    • Click on the target that is the same as your project (e.g. myProject and not myProjectTest or myProjectUITest)
    • If the arrow beside "Link Binary With Libraries" is clicked you should see the list of libraries - which should in include libz.

提交回复
热议问题