IOS How to Unzip a file using SSZip

- (void)UnzippingZipFile {

    NSArray  *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, 
                                                        NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *outputPath = [documentsDirectory stringByAppendingPathComponent:@"/FolderName"];

    NSString *filePath = [NSString stringWithFormat:@"%@/%@", documentsDirectory,@"ZipFile.zip"];
    NSString *zipPath = filePath;

    [SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];

}
 
You can download SSZip at :https://github.com/soffes/ssziparchive

Comments

Popular posts from this blog

Java : Variables Declaring

SQL Self JOIN