Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent storage (WebSQL and local storage) in iOS 6 w/ PhoneGap

The issue of iOS not persisting localStorage/WebSQL databases has been discussed frequently here and on other sites. The problem I am having is that the workarounds are so varied and have evolved over time. I have found 2 different PhoneGap plugins which use the native SQLite API, a plugin that periodically copies the SQL database to the documents directory,and even suggested settings in a Xcode .plist file that can be used to specify the location of SQL database. It's confusing because I'm not sure which solution applies best to the current point in time (iOS 6+ and Cordova 2.4+). Is this built in to Cordova now or do I still need a plugin. If so, which plugin? What about the setting the database location in an Xcode config file. Any help is deeply appreciated

like image 870
user2109611 Avatar asked Feb 26 '13 03:02

user2109611


1 Answers

Current versions of phonegap don't require a external plugin to use SQL with a sqlite database. The current code is compatible with iOS. You don't need to write/implement your own workaround, and you can be sure that phonegap will implement werever you need to get your app running (that's why the name phone-gap they will fill the GAP).

http://docs.phonegap.com/en/2.1.0/cordova_storage_storage.md.html#Storage

like image 97
Mahomedalid Avatar answered Oct 19 '22 09:10

Mahomedalid