Phonegap offline storage

I am working on an iPhone mobile application that downloads content from the web in the form of HTML documents with text, images and embeds HTML5 video.

I want to download these documents as they are available, and store them locally, for further offline reading. I searched a bit and found that the optimal place to store such data would be in the Documents folder. However, I really don't know how to access it using the Phonegap API.

I know how to create an XHTML file from js, but how can I read / write files from / to my application folder?

+4
source share
2 answers

I will not store video data in the database. Also in web-sql there is a 50 MB limit for the entire database in IOS. I would use the PhoneGap file API to connect to the file system http://docs.phonegap.com/en/2.1.0/cordova_file_file.md.html#File

Also consider encrypting videos by writing an object plugin c or using something like RNCryptor https://github.com/rnapier/RNCryptor

+3
source

All Articles