Search code examples
swiftcarthagessziparchive

No Such Module 'SSZipArchive' using Carthage XCode 8.1


i want to add SSZipArchive to my project. I already run carthage update, add SSZipArchive.framework to embedded binaries and Linked Frameworks and Libraries enter image description here

i also check Framework Search Paths and it's located right and have the file ZipArchive.framework and ZipArchive.framework.dSYM but i get No Such Module 'SSZipArchive' what's wrong?


Solution

  • As you have used Carthage, you need to add import ZipArchive in the file where you want to use it instead of import SSZipArchive.

    Source:ViewController.swift in the demo project

    #if UseCarthage
        import ZipArchive
    #else
        import SSZipArchive
    #endif
    

    For the error:

    module compiled with swift 3.0 cannot be imported in swift 3.0.1

    rebuild your Carthage dependencies using the following command,

    carthage update --platform iOS --no-use-binaries