Code Monkey home page Code Monkey logo

sarunarchiveany's Introduction

SARUnArchiveANY

A very useful library for Unarchiving the .zip, .rar, .7z files for iOS.

Simply An Integration of the following libraries :

* Unrar4iOS
* SSZipArchive
* LZMA SDK (7z)

Pros:

	* Integration of the most popular archiving libraries, no need for integrating each library separately.
	* Completely Block-based syntax. No Delegation pattern, hence avoiding a lot of clunky codes.
	* UnArchive Password protected files (Except 7z).

* Example project illustrates on how to display your app in "Open in" action sheet list, when tapped on any of the archive file of the supported format (zip, rar, 7z) in any apps installed on the device/simulator.
* Example illustrates on how to make the app support for iTunes File Sharing.


Cons:

	* Have tested this only with smaller files. Might not suit well for files with larger 
	  sizes ( May be files > 500MB's ).

Installation :
Add the following to your CocoaPods Podfile

pod 'SARUnArchiveANY'

or clone as a git submodule,

or just do these 3 steps :

(i) Copy/Include the "External" folder into your project.
(ii) Copy/Include  "Unrar4iOS.framework" & "libz.dylib" into your project.
(iii) Finally, Copy "SARUnArchiveANY.h" & "SARUnArchiveANY.m" into your project.
That's it. your done.

Recommended are the Last 2 options, since i found difficult to put up the complete settings for "Unrar4iOS" framework into the Pod file.

Usage :

SARUnArchiveANY *unarchive = [[SARUnArchiveANY alloc]initWithPath:filePath];
unarchive.destinationPath = destPath;//(Optional). If it is not given, then the file is unarchived in the same location of its archive file.
unarchive.completionBlock = ^(NSArray *filePaths){
  NSLog(@"For Archive : %@",filePath);
	for (NSString *filename in filePaths) {
		NSLog(@"File: %@", filename);
	}
};
unarchive.failureBlock = ^(){
};
[unarchive decompress];

sarunarchiveany's People

Contributors

keepmovingxin avatar larrytin avatar saru2020 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.