Zip

Contents

A Cordova plugin to unzip files in Android and iOS.

https://github.com/MobileChromeApps/cordova-plugin-zip

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-zip npm install @ionic-native/zip
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/zip

Supported Platforms

  • Android
  • iOS

Usage

import { Zip } from '@ionic-native/zip/ngx';

constructor(private zip: Zip) { }

...

this.zip.unzip('path/to/source.zip', 'path/to/dest', (progress) => console.log('Unzipping, ' + Math.round((progress.loaded / progress.total) * 100) + '%'))
 .then((result) => {
   if(result === 0) console.log('SUCCESS');
   if(result === -1) console.log('FAILED');
 });