One of the i3Factory developer is working on a project of sending paths attaching photos, text, and audio / video which needs to import a framework library for zipping files.
He found that this library seems to be constantly updated (usually found only those “no arc” for iOS4 ..) https://github.com/kolpanic/
In ZipKit is present a brief guide to the installation, but Claudio, our Italian developer, finds it extremely superficial and not riescito to import anything (that is ZipKit.framework libtouchzipkit.a remain the “reds“). Inside Zip Kits are also linked apps that should be an example, but unloading the one for iOS and trying to start it now “Build Failed”. Our developer is still inexperienced on how to integrate projects on other projects and setting dependencies.
Let us then explain how the whole mechanism, what needs to touch, what not, etc. ……
So the static library of interest and ‘the libtouchzipkit.a (and the other‘ the static library for OSX).
2) To clone from github the whole project ZipKit and copy the entire project folder within your project (this step is not necessary but recommended so you’re sure to have the version of ZipKit right for your project ).
5) also so that you can see the headers you need to add the header path is the path where ZipKit. If in step (2) avevevato copied the folder under the project ZipKit inside the main project folder, you only need to add. / ZipKit. In our case given that Charles did not copy the project must discover the absolute or relative path with respect to its project. Typically Charles goes like this:
5.1) in XCode select the sub-project (in this case ZipKit)
5.3) now. H file is the main ZipKit.h that is located just below the directory you just searched, and then we go to our main target, we select Build Settings and Header Search Path and add the path previously found (see figure)
5.4) also we look for the section “Other Linker Flags” and add “–ObjC–all_load” (see figure)
At this point the project (ZKtest download it here) and ‘ready. Where we need to import the file “ZipKit.h” (note that we have indicated ZipKit / ZipKit.h given that the header file is located two levels below ZipKit header path than we had indicated before: ../../Frameworks/Data/
- headers needed for the compiler to check the correctness of your code and generate the binary code that calls functions; the header search path by default points to the project and the framework of system, so it’s up to you to manually add additional header search path
- even if you have entered the correct header, then the linker will have to find the binary code associated with the functions you referenced: iOS, since there are no frameworks (at least until iOS7), you must load the static libraries (which are then copied to the application and statically loaded along with the rest of the track of the app): you can specify the static libraries in the Build Phases –> Link binary with libraries
- You can optionally add in the “Target Dependencies” target “touchzipkit”: this ensures that the compilation of your code should always be preceded by the compilation of the original library: this and ‘useful if you make changes to the event, in this case forced the generation of the target . Probably you will not do this if ZipKit compiled separately and then do not touch it anymore. But realize that this is‘ suggested in case you have decided to support several architectures or change SDK (compilation assures you that there is no incompatibility). This of course should not be done if you provide a library without source code (for example, Urban Airship or Google Analytics does not give you the source code and therefore do not need to add the project in the target dependencies).