Zip
A Cordova plugin to unzip files in Android and iOS.
https://github.com/MobileChromeApps/cordova-plugin-zip
Stuck on a Cordova issue?
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#
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-zip $ npm install @ionic-native/zip $ ionic cap sync
$ ionic cordova plugin add cordova-plugin-zip $ npm install @ionic-native/zip
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { 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'); });