Skip to main content

Zip

A Cordova plugin to unzip files in Android and iOS.

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

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install cordova-plugin-zip
$ npm install @ionic-native/zip
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

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');
});