Search code examples
iosswiftxcodessziparchive

Unable to import and use SSZipArchive in Xcode 10.2 Swift 4 by manually drag and drop. Lot's of semantic issue errors


I created Fresh new Xcode iOS project and followed below steps.

  1. Drag & Drop SSZipArchive folder in Xcode project.
  2. Created Briging Header and imported Header file I.e. #Import "SSZipArchive.h"
  3. Added libz.tbd and security framework to a target

Then after it gave lot's of semantic issues. Can somebody please help me on this. It Would be really helpful if there is a video of importing this files in XCode iOS project. Please help me.

For reference please see screenshot below enter image description here

Can somebody please help me on importing manually.

enter image description here


Solution

  • https://github.com/ZipArchive/ZipArchive from this

    1. Add the SSZipArchive folder that contain minizip folder to your project.
    2. Add the libz and libiconv libraries to your target.
    3. Add the Security framework to your target. enter image description here
    4. Add the following GCC_PREPROCESSOR_DEFINITIONS: HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB MZ_ZIP_NO_SIGNING $(inherited). enter image description here
    5. Remove info.plist under target-> build phase-> copy bundle resources.