Hello !
As seen in the changelog : "Added Native SQLite plugin".
Is there any doc available ? Any example on how to implement this ?
Is this also available for web apps, or only for "native" packages ?
Printable View
Hello !
As seen in the changelog : "Added Native SQLite plugin".
Is there any doc available ? Any example on how to implement this ?
Is this also available for web apps, or only for "native" packages ?
There is no documentation yet for this or examples. Right now you would have to rely on reading the code.
Does anyone know how the SQLite-database is stored on the device? Is it stored in the browser cache or in the native file system?
The same as the local storage, in the browser's cache (and yes, iOS 6 can wipe it without telling you)
Ah, maybe then. This plugin seems to be for sencha wrapper (to generate native apps, such as apk for android). It may be some sort of bridge plugin to allow writing sqlite files on the devices instead of the browser cache. I know that phonegap uses some kind of trick like this.
My previous answer was about web sqlite in general, not about this "native sqlite" plugin which I haven't used yet.
Thanks for the clarification! I see, then perhaps someone from Sencha can answer on if the Native SQLLite plugin saves data on the device native filesystem or not like for instance phonegap does. This would be a game-changer for an planned app where we have to use PhoneGap because of the need for access for native filesystem.
Since I did not recieve any answers on wether or not the Native SQLLite plugin stores data on the devices native filesystem or not I ran a little test using the command line in Chrome dev tools.
I just ran:
The call resulted in null which means that no DB was created. Examined the code and it turns out a request is made:HTML Code:Ext.device.SQLite.openDatabase({
name: 'test',
version: '1',
displayName: 'test',
estimatedSize: 100,
creationCallback: function() {alert('DB created'); }
});
http://localhost:3000/?command=SQLite%23openDatabase&sync=true&name=test&version=1&displayName=test&estimatedSize=100& creationCallback=11&__source=http%3A%2F%2Flocalhost%2Ftest%2F&_dc=1365078199504
And since I have no server-configuration that can handle SQLite commands of course the operation would fail. Now the question is how to test-run the new native SQLLite plugin locally when running Chrome Dev Tools on a computer.. Any ideas? :-?
if you can't read the code then a quick noob test is to just add some console.logs in the required place, package the app for iOS, and use Safari>Develop>your_iOS_app to look in console for logs.