How to download and unzip a zip file on iPad using Phonegap and Zip.js

I'm trying to unzip a zip file on ipad that's been downloaded onto the device.  The app itself is build using Phonegap javascript code.  I'm trying to do this using zip.js in combination with FileWriter. The code I have so far is included in the attached file.

Here's the list of console messages that appear on Safari Debug:

Log -  successfully downloaded
Log -  Got the zip file from device storage
Log -  zip reader created
Log -  Got the entries
Log -  Outer: pdf
Log -  Outer: jpg
Log -  js/inflate.js
Log -  Got data from the entries
Log -  Got new file to create
Log -  Inner: jpg
Log -  Write completed.
Log -  Got data from the entries
Log -  Got new file to create  
Log -  Inner: jpg
Log -  Write completed.
Log -  Got data from the entries
Log -  Got new file to create  
Log -  Inner: jpg
Log -  Write completed.

In the above unzipping case, there were in fact 3 files in the zip file and the filenames from entries(i).filename were recorded correctly in Sqlite.  However, there were 2 pdfs and 1 jpeg file in the zip I'm currently trying  to extract, but according to the above console output, it seems there's some synchronicity issue with the way I've written this code since it's trying to extract 3 jpegs it appears.  Also, when I try to view any of the downloaded/unzipped files on the device, the console reports:
TypeError: 'undefined' is not an object (evaluating 'event.url')
TypeError: 'undefined' is not an object (evaluating 'event.type')

So there appears to be an issue with the blob of data from the extracted files that is used in the writer.

Has anyone used zip.js successfully in combination with FileWriter to unzip a file onto an ipad device.  For reference, the zip.js I'm referring to is from here:

I also tried using chromeutils zip functionality which some people have reported having success with to unzip files on devices, but my app is specifically for iPad, so it seems I can't use that.

If you know of any other way to extract the downloaded zip file onto an iPad device, I am also all ears.

Thank you for your assistance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sgotteAuthor Commented:
From having spent ages to try to get this to work and having had 0 luck on getting an answer here, StackOverflow and elsewhere, the answer as far as I'm concerned, if anyone needs to know in the future, is that it is impossible.  What I ended up doing, since multiple-file download simultaneously is also impossible with Phonegap as of this date (8-19-2014), is adding another page to the app where they can click to download one file at a time.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.