I am using IOS 5.1 with Phone-gap 1.3 and it seems, by default phonegap looks into ../Library/Caches folder for a database. I want to upgrade to a suitable higher version like 1.8 or 2.0. Do these new versions support finding the db by default in ../Documents dir because this is a preferable location and not /caches dir since IOS can anytime delete data from /Cache when encountering low memory problems.
Which is a suitable version of phone-gap considering the above mentioned point plus I have android platform also using the same phone-gap code.?
Any suggestions are most welcome.
Thanks in advance.
Version 2.1 (the latest) still stores the files in the same location but solves the problem of files getting deleted. For iOS 5.1 it takes a backup of the database. For iOS 6 it sets a property that tells iOS to keep the databases and web content.
Until the next release you probably want to get the latest source from GitHub since the 2.1 release has a small bug where localStorage data is not persisted the first time you run the application. From the second time onwards everything is fine.
EDIT
This bug https://issues.apache.org/jira/browse/CB-330 talks about the issue in 5.1 and how PhoneGap work around it.
EDIT AGAIN
This bug https://issues.apache.org/jira/browse/CB-1535 details the code fix required to make localStorage data persist from the first install on iOS 6.