1

I'm helping a consumer of my UnzipKit library, who's having problems linking the framework from his iOS-Swift framework target. UnzipKit uses MiniZip, whose unzip.h and ioapi.h headers include zlib.h. Those include lines are failing with this message:

Include of non-modular header inside framework module UnzipKit.<ioapi or unzip>

I realize that Xcode 7 is now using tbd libraries instead of dylib, but I've tried each of the following with each combination of source and target framework, and still get the errors:

  1. Replacing the libz.dylib reference with libz.tbd
  2. Removing all framework links with a -lz Other Linker Flag
  3. Creating a framework link to /usr/lib/libz.1.dylib
  4. Toggled the Allow Non-modular Includes in Framework Modules setting to Yes and No

He posted a sample project on GitHub. To reproduce:

  1. Checkout the project
  2. Install Carthage if you don't have it already:

    brew update
    brew install carthage
    
  3. Run carthage update in the checkout directory

  4. Open UnzipKitIssue.xcodeproj and build the UsingUnzipKit scheme
Dov
  • 15,530
  • 13
  • 76
  • 177
  • Take a look at the answers to [this question](http://stackoverflow.com/q/24103169/1180620). – Mark Adler Oct 30 '15 at 15:33
  • @MarkAdler Thanks, I updated my question to mention I tried the "Allow Non-modular Includes" setting. Most of the answers were restating that solution. Regarding the rest, the `zlib.h` header is outside my project (so I can't make it public), and it didn't seem like a good idea to move the includes of `zlib.h` into the .m files – I try to keep MiniZip as close to the original version as possible. – Dov Oct 30 '15 at 15:41

0 Answers0