if you are using Cordova sqlite plugin you may have this issue while open local DB file.
Use below to open DB:
window.sqlitePlugin.openDatabase({ name: "testDB.db", location: 2, createFromLocation: 1});
// Works on android but not in iOS
_sqlLiteDB = $cordovaSQLite.openDB({ name: "testDB.db", iosDatabaseLocation:'default'});
// Works on android but not in iOS
// Works on android but not in iOS
Error: Database location or iosDatabaseLocation value is now mandatory in openDatabase call
Use below to open DB:
window.sqlitePlugin.openDatabase({ name: "testDB.db", location: 2, createFromLocation: 1});
Solution:
if(isAndroid){// Works on android but not in iOS
_sqlLiteDB = $cordovaSQLite.openDB({ name: "testDB.db", iosDatabaseLocation:'default'});
} else{
// Works on iOS
// Works on iOS
_sqlLiteDB = window.sqlitePlugin.openDatabase({ name: "testDB.db", location: 2, createFromLocation: 1});
}