PDA

View Full Version : How to Unzip a zip file in objective C??




rahulvaishnav
Jul 21, 2009, 05:50 AM
Hi all,

I want to extract a zip file at particular path using Objective C on Mac OS.
After googling I came to know that ZipArchive is the library someone has provided. But I could not compile it in Mac , I am facing errors while compiling it. Can any one please let me know some solution for Unzipping a zip file.

I will be very thankful.

Regards,
Rahul Vaishnav



lee1210
Jul 21, 2009, 07:41 AM
Maybe this (http://code.google.com/p/zip-framework/)?

-Lee

pcwiz
Jul 21, 2009, 04:52 PM
You could use the UNIX utility "unzip" with NSTask (http://www.cocoadev.com/index.pl?NSTask)

autorelease
Jul 22, 2009, 06:09 AM
zlib is part of Mac OS X, I see /usr/lib/libz.dylib and /usr/include/zlib.h. It's pretty much the de facto zip/unzip implementation.

I'm not sure how well-documented it is, you're probably better off forking a process and getting "unzip" to do it for you.