Tuesday, August 25, 2009

Decompressing .zip files with iWorkImport.framework.

.zip files need to be supported in lots of places on the iPhoneOS. .ipa are zip files, .docx are zip files, .key are zip files. Unfortunately there is no centralized framework or library to handle these zip files. In fact, all Bom.framework, OfficeImport.framework and iWorkImport.framework have their own, private implementation to decompress a .zip file. Out of the three, iWorkImport.framework is the friendliest.

This example code shows how to open a .zip file and read the content:

http://pastebin.com/f16274c11

(Of course, if you write your new application, you should not unzip like this :) use something documented such as ziparchive.)

No comments:

Post a Comment