Hi, I’m having the following issue when I try to open sqlite database:
if (window.cordova && window.SQLitePlugin) {
db = sqlite.openDB({ name: configuration.dbName, location: 1, bgType: 1 });
} else {
db = window.openDatabase(configuration.dbName, '', configuration.dbName, 100 * 1024 * 1024);
}
window.SQLitePlugin is undefined and don’t know why.
Here is my package.json:
{
“name”: “…”,
“version”: “1.0.0”,
“description”: “An Ionic project”,
“dependencies”: {
“cordova-android”: “^6.2.3”,
“cordova-plugin-network-information”: “^1.3.3”,
“cordova-plugin-whitelist”: “^1.3.2”,
“gulp”: “^3.5.6”,
“gulp-concat”: “^2.2.0”,
“gulp-minify-css”: “^1.2.4”,
“gulp-rename”: “^1.2.0”
},
“devDependencies”: {
"@ionic/cli-plugin-cordova": “1.4.1”,
"@ionic/cli-plugin-gulp": “1.0.2”,
"@ionic/cli-plugin-ionic1": “2.0.1”,
“bower”: “^1.3.3”,
“gulp-sass”: “^3.1.0”,
“gulp-util”: “^3.0.8”,
“shelljs”: “^0.7.8”
},
“cordovaPlugins”: [
“cordova-plugin-device@1.1.1”,
“cordova-plugin-console@1.0.2”,
“cordova-plugin-whitelist@1.2.1”,
“cordova-plugin-splashscreen@3.1.0”,
“ionic-plugin-keyboard@1.0.8”,
“cordova-plugin-appavailability@0.4.2”,
“cordova-plugin-network-information@1.2.0”,
“cordova-plugin-geolocation@2.2.0”,
“cordova-plugin-statusbar@2.1.0”,
“cordova-plugin-customurlscheme@4.2.0 --variable URL_SCHEME=osdepymturnoscepre”,
“cordova-plugin-inappbrowser@1.2.1”,
“cordova-plugin-app-version@0.1.8”,
“com.lampa.startapp@0.1.4”,
{
“locator”: “https://github.com/Rohfosho/CordovaCallNumberPlugin.git”,
“id”: “mx.ferreyra.callnumber”
},
{
“variables”: {
“SENDER_ID”: “821585536933”
},
“locator”: “phonegap-plugin-push@1.6.1”
},
{
“locator”: “https://github.com/brodysoft/Cordova-SQLitePlugin”,
“id”: “cordova-plugin-customurlscheme”
}
],
“cordovaPlatforms”: [
“android”,
“ios”
],
“cordova”: {
“platforms”: [
“android”
],
“plugins”: {
“cordova-plugin-network-information”: {},
“cordova-plugin-whitelist”: {}
}
}
}