Re: Storing data in SQLlite not working

111 views
Skip to first unread message

Marc Witteveen

unread,
Aug 7, 2012, 10:26:43 AM8/7/12
to phon...@googlegroups.com
I read that with previous versions of Phonegap there was an issue with storing data in iOS 5.1 any clue if this sis solved or still there?

On Monday, 6 August 2012 20:56:47 UTC+2, Marc Witteveen wrote:
Hi, I am using the code at http://docs.phonegap.com/en/2.0.0/cordova_storage_storage.md.html and data seems not to be stored or retrieved. The targeted platform is iOS 5.1.

Any suggestions what could be wrong? Where to look at?

Thanks,

Marc

Chris Brody

unread,
Aug 7, 2012, 1:05:05 PM8/7/12
to phon...@googlegroups.com
That issue was solved in 1.6: they added a special backup mechanism.

A more robust mechanism was made in the plugin https://github.com/davibe/Phonegap-SQLitePlugin

I made a fork in https://github.com/chbrody/Cordova-SQLitePlugin that follows the Web SQL API more closely and also adds a version for Android.

Marc Witteveen

unread,
Aug 7, 2012, 4:37:12 PM8/7/12
to phon...@googlegroups.com
Thanks Chris, I'll have a look at that.

Do you maybe have an idea why the code from their page is not working?

Thanks,

Marc

purplecabbage

unread,
Aug 7, 2012, 6:11:31 PM8/7/12
to phon...@googlegroups.com
Just an FYI that the WebSQL standard that this is based on has been deprecated. 

My advice would be to avoid relational DB if possible, and use localStorage and/or the File API.

The next standard you will be seeing to fill this gap is indexedDB.

Cheers,
  Jesse

@purplecabbage

Chris Brody

unread,
Aug 8, 2012, 5:36:54 AM8/8/12
to phon...@googlegroups.com
I agree NoSQL API should be the future, using IndexedDB. I just found
pouchdb.com which provides an excellent API over IndexedDB and also
synchronization with remote CouchDB or PouchDB.

For now, it should be possible to use
http://nparashuram.com/IndexedDBShim/ to get the IndexedDB API over
either the built-in WebSQL or the PG/Cordova SQLiteAPI. I have already
been able to build and run the Android version of the plugin with
SQLCipher (encryption) and will be working on running the iOS version
over sqlcipher.

Chris
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
>
> To compile in the cloud, check out build.phonegap.com
>
>
Reply all
Reply to author
Forward
0 new messages