开发者

ZipKit and iPhone

I tried to use the ZipKit framework (http://bitbucket.org/kolpanic/zipkit/wiki/UsingZipKit) in the test application for iPad. I followed the "Traditional way" of the installation (as it is described on their page) with no success. Hope somebody can help me with it:

1/ I used hg to get sources

2/ I build the ZipKit project (Release build)

3/ After doing this there was created in the build folder the new ZipKit.framework folder

4/ I have created a new test project for the iPad 3.2 (XCode 3.2.4)

5/ I have drag&dropped the ZipKit.framework folder created in the step 3) into Frameworks section on my new test project

6/ In Targets section I have created new Copy File Build Phase and I drag&drop the ZipKit.Framework from Frameworks section to the new Copy Files folder.

7/ Then I build and run the project.

The project cannot be even started, it is being closed after I press the project icon - so I must do something terribly wrong. In the console output I can see the error - it is pretty clear what is missing, but I do not know what to do with that... Might be some XCode expert or someone, who used the ZipKit can help me - this must some really stupid mistake I am doing...

There is the console output:

dyld: Library not loaded: @rpath/Frameworks/ZipKit.framework/Ver开发者_开发问答sions/A/ZipKit
  Referenced from: /Users/sten/Library/Application Support/iPhone Simulator/3.2/Applications/3C51FC4F-0E85-48D2-BC68-D01ADD73DAE1/ZipExample.app/ZipExample
  Reason: image not found
Failed to launch simulated application: iPhone Simulator failed to find the process ID of com.yourcompany.ZipExample.

BTW - I have tried to run the ZipKit Touch example provided with the framework and it works perfectly...

Thanks a lot BR STeN

There is the screenshot of my test project - on the left side you can see the ZipKit.framework I drag&drop into my project:

ZipKit and iPhone


Is there a basic page which shows some simple code for inflating and deflating files and directories for ZipKit?

UPDATE: I figured this out but it was a scavenger hunt:

NSString *filePath = [userDocumentsDirectory stringByAppendingPathComponent:@"newFile.zip"];

ZKFileArchive *archive = [ZKFileArchive archiveWithArchivePath:filePath];
[archive deflateDirectory:exportDirectory relativeToPath:nil usingResourceFork:NO];


You should go back and read it again.

The "traditional way" is not the right way to do this - Apple don't allow iOS applications with external frameworks like this - you want to link against the static library instead using the process described under "Static Library Target".


I've updated the Using ZipKit page to make it clear which ZipKit target should be used for what type of product.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜