title: Swift 2 / iOS 9 - libz.dylib not found
body: <p>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.</p>
  
  <p>Xcode is now unable to import the libz.dylib and throws some errors </p>
  
  <blockquote>
    <p>Undefined symbols for 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)
      "<em>deflateInit2</em>", 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)
      "<em>inflateInit2</em>", referenced from:
          +[GAICompressionUtil gai_dataByInflatingBytes:length:isRawData:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o)
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>
  
  <p>When looking through the available packages in the "build phase" settings I can find "libz.tbd" which seems to be the replacement for the libz.dylib. When importing this lib the linker error stays the same but I get this additional warning:</p>
  
  <blockquote>
    <p>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 &amp; Libraries build phase)</p>
  </blockquote>
  
  <p>What to do?</p>