Swift 2 / iOS 9 - libz.dylib not found

前端 未结 8 1161
小蘑菇
小蘑菇 2020-12-04 10:49

I\'m using some external codes from google in my new Swift 2.0 project that required \"libz.dylib\" in earlier versions. After updating to the new Xcode / the new SDK.

相关标签:
8条回答
  • 2020-12-04 11:14

    You can add libz.1.dylib from location:/usr/lib/

    1. Go to Build Phases >Link Binary with Librairies > + > Add other
    2. Once in the file selection window do CMD+Shift+G (Go to folder) and type /usr/lib/
    3. From /user/lib you can add : libz.1.dylib

    It worked for me.

    0 讨论(0)
  • 2020-12-04 11:18

    libz.dylib is the dynamic lib for Zlib, You can install Zlib from here http://zlib.net/

    0 讨论(0)
  • 2020-12-04 11:26

    Remove all dynamic libraries (dylib) from the linking with binaries phase. It will find these libraries on its own.

    0 讨论(0)
  • 2020-12-04 11:35

    I had the same problem. I found some kind of way around.

    1. Go to Build Phases >Link Binary with Librairies > + > Add other
    2. Once in the file selection window do "CMD"+Shift+G (Go to folder) and type /usr/lib/
    3. From /usr/lib you can add : libz.dylib and more...
    4. Compile and have fun
    0 讨论(0)
  • 2020-12-04 11:35

    I have this problem in objective-c project.ios9.1,xcode7.1

    1.Go to Target> Build Phases >Link Binary with Librairies > +

    2.select libz.tbd and add it

    It worked for me

    0 讨论(0)
  • 2020-12-04 11:36

    libz.dylib is now found under libz.tbd quote from the Apple developer forums:

    For those who are curious, the .tbd files are new "text-based stub libraries", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.

    Hopefully more documentation will be coming soon.

    edit

    To clearify it, i will cite Guitz answer with the updated Content

    1. Go to Build Phases >Link Binary with Librairies > + > Add other
    2. Once in the file selection window do "CMD"+Shift+G (Go to folder) and type /usr/lib/
    3. From /user/lib you can add : libz.tbd and more...
    4. Compile and have fun
    0 讨论(0)
提交回复
热议问题