Search code examples
iphonensdataunzipgoogle-toolbox-for-mac

Unzippping NSData with GTMNSData+zlib


I download from Google Docs zipped NSData. The first bytes are PK. I've read to unzip them I could use GTMNSData+zlib category. Compiling my project, I obtain some errors, for example:

"_inflate", referenced from:
+[NSData(GTMZLibAdditions) gtm_dataByInflatingBytes:length:] in GTMNSData+zlib.o
ld: symbol(s) not found

Solution

  • You need to include zlib in your frameworks for your project. In XCode 4 select your project in the top of the Project Navigator, Go to Build Phases, Link Binary With Libraries, click the + sign to add and search for libz.dylib, if you need a specific version just select the right version.