libz dylib with static link not support iOS 7

337 Views Asked by At

Details in my project:

  1. Using swift 1

  2. Need support iOS 7

  3. Using ZipArchive

  4. Not use cocoapods or something else

On my project, i need unzip something. So i'm using ZipArchive, this is dynamic linking. Works on project when i'm not archive(means xcode archive) and put on testflight.

But when upload to testflight, iOS 7 not support dynamic linking, so it's failed.

I'm try to create a new Static Library target, but dylib is still need dynamic linking. It's conflict...

How to deal with this?

First solution on my mind is: Require zlib's source code, but this is very complex....

Maybe find some other way to unzip archive with swift will be more simple?

1

There are 1 best solutions below

0
shar0 On

I'm resolved my problem currently.

Just include all ZipArchive's file to Build Phases (.c/.m -> Compile Sources, *.h -> Headers -> Project)

Include header in bridge file, They will slow down compile but works.

Not sure any possible issue for future.