Open CampaUTN opened 7 years ago
Happens to me too
Did you found any solutions? i am also facing this problem.
Nope. It's seems that is not supported yet. The only way I found so far is prepopulate the database when loading for first time.
On Aug 24, 2017 23:01, "Shah Khalid" notifications@github.com wrote:
Did you found any solutions? i am also facing this problem.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/litehelpers/cordova-sqlite-ext/issues/63#issuecomment-324756671, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5F2HMAKYeE3oXVZyGmu6ZRJ31qjAFhks5sbeS9gaJpZM4Ot0NV .
For me it's working flawlessly in Android, however, it's creating an empty DB in IOS 11. Any solution or workaround will be appreciated.
@ergurjeet How did you make it work in Android?? I still got empty DB instead of my prepopulated one
I am fancing the same error in iOS.. the same code in android is working perfectly..
@DetoloX which code is working for you? i can't make it work in android
In case of issues with pre-populated databases: please start with https://github.com/brodybits/cordova-sqlite-ext-bootstrap-starter-app which has CC0 (public domain) license. In case of Ionic please try https://github.com/iursevla/ionic2-PreDB (Unlicense - also public domain, thanks @CampaUTN for pointing it out) or one of the other Ionic starters already documented.
IMPORTANT NOTE: Beware that the pre-populated database will NOT be copied if database with the same name was already copied or initialized. This is a common pitfall that was already documented.
@sofarojo the example given on https://ionicframework.com/docs/native/sqlite/ with additional setting of createFromLocation:1
with https://github.com/litehelpers/cordova-sqlite-ext plugin is working for me on Android.
@brodybits, thanks for the links, I will give it a try. In IOS, it's stuck at "new transaction is waiting for open operation". Even tried (window as any).sqlitePlugin.selfTest(function() { console.log('SELF test OK'); }); console.log('Test executed');
(after device ready) and echoTest, but 'SELF test ok' was never printed in the console. Also, tried uninstalling and installing the plugins several times.
@brodybits @ergurjeet Thank you very much!!, finally It worked. I updated my project to the latest version of angular and ionic. I made some changes in my data service thanks to this guy nicobytes [https://github.com/ion-book/demo107]
Hi I cant load a populated database, its notrecognizing the .db file so its creating a new empty one. I have the plugins, the code is copied from here (also tried a lot of different sources): https://github.com/iursevla/ionic2-PreDB
The plugin is acctually working? Because I see travis failing In case the last version is working, do am i missing something apart from the 'guide' of that repository i have copied?
Thank you very much
private options = { name: "datos.db", location: 'default', createFromLocation: 1 }; private queryNames = "SELECT * FROM testTable"; public names: String[] = [];
==> Return: no such testTable and sqlite_master no rows