Mobile iPad app that writes to the file system

Hi everyone

I have an opportunity to develop an app for someone for their iPad.

Lets assume we have no Internet access anywhere …

So my idea is to create an app that runs on the iPad (no MongoDB)
just maybe GroundDB etc for localstorage… and have an option
to save a CSV file from the app onto the iPad device.

Then, with iTunes, user can connect the iPad to their iMac via USB
and hopefully transfer that CSV file to the iMac so that it can
be imported into some accounting software (MYOB/Quickbooks)
running on the iMac.

Just wondering how this can be achieved.

I’m thinking this would need cordova-plugin-file so the app can write
to the iPad filesystem. All good there I suppose.

I haven’t got that far yet, but would iTunes recognise that the
app running on the iPad is a candidate for showing up in the File Sharing
area of apps that are detected on the iPad.

I’ll continue on and do it anyway, and report back my findings,
but if anyone has any ideas, I’d be grateful to hear them.

There are two valid locations to store persistent files on an iOS device: the Documents directory and the Library directory. Previous versions of the plugin only ever stored persistent files in the Documents directory. This had the side-effect of making all of an application’s files visible in iTunes, which was often unintended, especially for applications which handle lots of small files, rather than producing complete documents for export, which is the intended purpose of the directory.

It is now possible to choose whether to store files in the documents or library directory, with a preference in your application’s config.xml file. To do this, add one of these two lines to config.xml:

<preference name="iosPersistentFileLocation" value="Library" />

<preference name="iosPersistentFileLocation" value="Compatibility" />

If your application is new, or has never previously stored files in the persistent filesystem, then the Library setting is generally recommended.


Thank you

1 Like

Have you figured out how to do it?

Hi aaabbbccc

No, sorry.

The opportunity passed and I didn’t get any feedback from the original idea source, so dropped the idea.

Did you need to do this also?

Maybe we can collaborate on something?