How do I zip a folder on the iPhone - iphone

I have seen a lot of related questions but none really helped.
I'm trying to create a zip archive from a folder (on the iPhone).
The structure of the folder is the following:
In this example the zip would be "folderToBeZipped.zip"
What is the easiest way to accomplish this and how do I unzip it (also iPhone) later on?

Maybe you can find this project useful
http://code.google.com/p/ziparchive/

Related

How to get a file out of a compiled unity game that I made

I created a mini game using Unity and built it a few months back. It was just a pet project so I deleted the project file but still have the built/compiled game. In the project's ASSETS, I put a text file with some notes that I had created for myself and some scripts.
Is there a way to extract or even just see the text file from my built game? Is there a way to extract all the assets or something?
I'm extremely new at this kind of thing so unfortunately, I don't really know the right way to ask the question or find it on google. Any help would be appreciated.
Thank you.
Probably not
That text file, if it wasn't used as an asset, isn't going to be in your compiled game anyway. But even if it was, finding it and extracting it would be difficult due to the semi-obfuscated nature of dlls and how Unity compresses and builds assets into dlls.
If you want to make the file accessible post-build by design, use StreamingAssets folder.
Otherwise you'll have to rely on 'uglier' methods as mentioned by Draco18s (people steal assets all the time so it's not impossible).
what's your building platform ?
if it's android then you can get a look at the scripts and other text files using ILSpy.
Just change the .apk to .zip
Unzip, and open the compiled files in ILSPY.

Packaging multiple applications together

I have a project that requires me to add another application to the package.
This application will act as a proxy, such as the one described in the BBMSDKDemoProxy sample project. I'd like the user to be able to download one package, both applications are installed, and my main application is launched via the proxy.
The problem is that I don't know exactly what steps to follow to achieve this. The project will be distributed via the app world, but I'd like to know how to do this via a website too.
I've found a link stating that you simply add both applications in a single .zip and upload that to the app world, but I want to be sure about this.
Any help would be greatly appreciated, thanks.
For AppWorld: just include the extra cod file in the file set to be uploaded. If you are uploading a zip then include the extra cod in the zip content.
For Desktop/BES: you can include the cod file along the other files and manually edit the .alx to add an entry for the new module. I'd not recommend doing this unless you have a good understanding of the alx format and the different elements in the descriptor.
For OTA downloads: You'd place the new cod file with the other cod files (if it contained sibling cods you'd publish the siblings instead). Then you can manually edit the .jad file to add the new module(s).
Of these 3 options, only the first one is safe. Manually editing the alx or jad is tricky, and is very easy to make mistakes. If you need files for desktop-BES or OTA installs I'd add a new library project as #preetam has suggested in the comments.

iOS/Objective-C read 4GB or greater of Zipped archive library?

I have tried using:
Objective-Zip
ZipKit
Both say they have the capability of reading 4GB or larger zipped archives. Has anyone successfully been able to read very larged zipped content using one of the libraries mentioned above?
If you know a better zipped archive library, please let me know.
I ran into the same problem and trying to solve it over couple of days.
Finally, i solved it.
With my instruction you can unzip big files (even 8GB) in iOS without any problems.
This is an step-by-step instruction how to solve it:
1) Download Objective-Zip from https://github.com/flyingdolphinstudio/Objective-Zip
2) Download MiniZip from https://github.com/nmoinvaz/minizip
3) Take 4 files - ioapi.c, ioapi.h, unzip.c, unzip.h - from minizip folder (which you downloaded in step 2) and paste it to the Objective-Zip/MiniZip folder (override files).
4) Go to Objective-Zip/Objective-Zip/ZipFile.m and replace this string
int err= unzLocateFile(_unzFile, [fileNameInZip cStringUsingEncoding:NSUTF8StringEncoding], 1);
to this
int err= unzLocateFile(_unzFile, [fileNameInZip cStringUsingEncoding:NSUTF8StringEncoding], (unzFileNameComparer)1);
5) Finally, add Objective-Zip to your project and happy unzipping! :)
Now you can unzip big files in iOS. I checked on 8GB-zip, everything works like a charm!
P.S.: developer of Objective-Zip will update it with my fix as soon as possible, so this instruction is actual for Objective-Zip 0.8.1 only.
As long the zip library supports PKWare's ZIP64 extension then it should be able to work with large files over 4GB.
Objective-Zip uses minizip 1.1 which supports ZIP64.
ZipKit website states it supports ZIP64 extension.
Both these libraries should work. I have experience with minizip 1.1 and I know for certain that it supports large files.

PAK archives and zlib (zlib.dylib)

I'm currently writing an iPhone app where I need to uncompress several files from .pak archive. I'm assuming libz.dylib will probably have the ability to do this but I'm having a hard time find any code on the subject.
Anyone got any example code or can point me in the right direction? Any help at all would be much appreciated.
Cheers.
What do you mean by "PAK"?
If it's actually a .zip, look up minizip or ziparchive, which may do what you want.

Is there a file management library for the iPhone Documents folder?

I am look for file management features, such as:
folder listing
file listing
create/rename/delete folder
rename/delete files
move files among folders
via a UITableView. BSD-like licensed code preferred.
Thanks
I'm afraid I'm not aware of any open-source ready to go components but what you want should be fairly easy to accomplish for somebody with a basic grasp of iPhone development. Check out the NSFileManager class for further direction.