google analytics - Swift 2 / iOS 9 - libz.dylib not found -


i'm using external codes google in new swift 2.0 project required "libz.dylib" in earlier versions. after updating new xcode / new sdk.

xcode unable import libz.dylib , throws errors

undefined symbols architecture i386: "_deflate", referenced from: +[gaicompressionutil gai_databycompressingbytes:length:compressionlevel:mode:] in libgoogleanalyticsservices.a(gaicompressionutil.o) "_deflateend", referenced from: +[gaicompressionutil gai_databycompressingbytes:length:compressionlevel:mode:] in libgoogleanalyticsservices.a(gaicompressionutil.o) "deflateinit2", referenced from: +[gaicompressionutil gai_databycompressingbytes:length:compressionlevel:mode:] in libgoogleanalyticsservices.a(gaicompressionutil.o) "_inflate", referenced from: +[gaicompressionutil gai_databyinflatingbytes:length:israwdata:] in libgoogleanalyticsservices.a(gaicompressionutil.o) "_inflateend", referenced from: +[gaicompressionutil gai_databyinflatingbytes:length:israwdata:] in libgoogleanalyticsservices.a(gaicompressionutil.o) "inflateinit2", referenced from: +[gaicompressionutil gai_databyinflatingbytes:length:israwdata:] in libgoogleanalyticsservices.a(gaicompressionutil.o) ld: symbol(s) not found architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation)

when looking through available packages in "build phase" settings can find "libz.tbd" seems replacement libz.dylib. when importing lib linker error stays same additional warning:

warning: skipping file '/applications/xcode-beta.app/contents/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator9.0.sdk/usr/lib/libz.tbd' (unexpected file type 'text' in frameworks & libraries build phase)

any idea do?

i had same problem. found kind of way around.

  1. go build phases >link binary librairies > + > add other
  2. once in file selection window "cmd"+shift+g (go folder) , type /usr/lib/
  3. from /usr/lib can add : libz.dylib , more...
  4. compile , have fun

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -