storesafe / cordova-sqlcipher-adapter

A Cordova/PhoneGap plugin to create and access encrypted databases on Android, iOS, and Windows with API similar to HTML5/Web SQL API
Other
89 stars 55 forks source link

Windows fallback using cordova-sqlite-storage #78

Closed nsteenbeek closed 5 years ago

nsteenbeek commented 5 years ago

Since 0.1.12 the Windows app has no window.sqlitePlugin anymore to support opening a db without 'key' option. Using cordova-sqlite-storage is not an option, since that will brake Android/iOS, because it uses window.sqlitePlugin too. How to get Windows running in same codebase?

brodycj commented 5 years ago

I would use a conditional based on whether or not your app is on windows. If you app is on Windows then you would open the database with no key option. I hope this helps.

nsteenbeek commented 5 years ago

I tried that, but then found window.sqlitePlugin was not there. That due to plugin.xml

<platform name="windows-disabled">

That results in no sqlitePlugin at all for Windows.

brodycj commented 5 years ago

My apologies for the delay, you are correct. Windows support is dropped for now, as discussed in #63. I will explain further in #63, closing this one as a duplicate.