javascript - Extractzipfile plugin have error: plugin not found in ios -


i trying use extractzipfile plugin ios @ "https://github.com/phonegap/phonegap-plugins/tree/master/ios/extractzipfile".

but when use plugin in ios it's show error:

2013-04-05 11:20:17.968 fileandzip[751:c07] error: plugin 'extractzipfileplugin' not found, or not      cdvplugin. check plugin mapping in config.xml.   2013-04-05 11:20:17.969 fileandzip[751:c07] -[cdvcommandqueue executepending] [line 103] failed   pluginjson = [     "extractzipfileplugin733749280",     "extractzipfileplugin",     "extract",     [       "test.zip",       "\/users\/alienware\/library\/application support\/iphone simulator\/6.1\/applications\/4bca6b22-c582-  4529-92ff-4c7e54e82c18\/documents\/ex"     ]   ] 

i in guild file. me fix it! lot...

edit:

this code:

    <!doctype html> <html>     <head>         <meta name="viewport" content="width=device-width, initial-scale=1.0">             <meta name="description" content="">                 <meta name="author" content="">                     <link rel="stylesheet" href="css/jquery.mobile-1.1.1.min.css" />                      <script src="cordova-2.5.0.js"></script>                     <script src="js/jquery-1.7.2.min.js"></script>                     <script src="js/jquery.mobile-1.1.1.min.js"></script>                     <script src="js/jquery.xdomainajax.js"></script>                     <script src="js/xml2json.js"></script>                     <script src="js/zipplugin.js"></script>                     <script src="js/jquery-ui.min.js"></script>                     <script src="js/jquery.ui.touch-punch.min.js"></script>                      <script type="text/javascript" charset="utf-8">                          function ongetdirectorysuccess(dir) {                             console.log("created dir "+dir.name);                         }                          function ongetdirectoryfail(error) {                             console.log("error creating directory "+error.code);                         }                          var sa;                         document.addeventlistener("deviceready", ondeviceready, true);                          function ondeviceready() {                             console.log("device ready");                             window.requestfilesystem  = window.requestfilesystem || window.webkitrequestfilesystem;                             window.requestfilesystem(localfilesystem.persistent, 0, gotfs, fail);                             $('#import').click(function(){                                                var ft = new filetransfer();                                                ft.download(                                                            "http://smartphone.thnt.vn/vietgames/gheptranhtu/test.zip",                                                            window.rootfs.fullpath + "/ex/test.zip",                                                            function(entry) {                                                            window.alert("download complete: " + entry.fullpath);                                                             },                                                            function(error) {                                                            console.log("download error" + error.code);                                                            }                                                            );                             });                             $('#unzip').click(function(){                                                window.plugins.extractzipfile.extractfile('test.zip',window.rootfs.fullpath + '/ex',win,fail);                                               function win(status)                                               {                                               window.alert('success'+status);                                               }                                                function fail(error)                                               {                                               alert("error:" + error);                                               }                                                });                          }                          function fail() {                             console.log("failed filesystem");                         }                          function gotfs(filesystem) {                             console.log("got filesystem");                              // save file system later access                             console.log(filesystem.root.fullpath);                             window.rootfs = filesystem.root;                             window.rootfs.getdirectory("ex", {create: true, exclusive: false}, ongetdirectorysuccess, ongetdirectoryfail);                         }                          </script>                      <style>                         img {                             max-width: 200px;                         }                         </style>     </head>     <body onload="init();" >         <h2>image download demo</h2>          <div id="status"></div>          <div id="photos">             <canvas id="canvas" style="width:200;height:400;border: 1px solid #cc0000;"></canvas>             <input id="unzip" type="button" value="unzip"/>             <input id="import" type="button" value="import"/>         </div>      </body> </html> 

i think missing settings

in cordova.plist (search plist) section, need add plugin key/pair value of:

extractzipfileplugin(key) extractzipfileplugin(value)


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -