How to read/write file on available device space

I’ve write this on cordova forum, but, since i’m a bit on a hurry, i’ll try here


I’ve started like 3 week ago, without any clue on how save file on the usb accessible IPhone space, or android sd card, but I believe it will be more easy on Android!

My requirement are… like, enter some data on the capture screen, save it on the space available since we can have it work where there is no signal. And retrieve the files later with a connection to a computer via USB, and, this have to work on IOS or Android

I’ve build the panels/sceen, to acquire data with Ionic, now, I’ve know how to do that stuff… Now I’m trying to save a simple file on the available space. on IOS cause this seem to not work well in a file browser like chrome and android. So, on my Mac, I’ve been able to run those 2 sample correctly, without apparent problem, using the phonegap application to test our application

and the write file

and console log seem ok.

BUT, file log.txt is not on the IPhone, like photos or other… file

So, my understanding is that I can’t write on this space and only on the … app space. like the www space. But, no way to access that file via usb and the space used DCIM where picture are save. Is that right?

Or, if we can, hot to do it? and if not… what are the best options?