I am developing an application for iOS and Android with Apache Cordova . I am using the plugin sqlite-storage
to store data locally.
The code I use is the one shown on this site:
The App has been tested on both Android and the iOS simulator.
On Android it works fine, just like on iOS 9.3 .
The problem I have is when I try it on iOS 10 .
The JavaScript code is the same for both platforms and for the different versions of the Apple mobile operating system.
My question is: Does anyone know if I should use a different code for iOS 10 ?
I leave below a simple code that works well with iOS 9.3 , but DOES NOT work on iOS 10 .
var db = null;
document.addEventListener('deviceready', function() {
db = window.sqlitePlugin.openDatabase({name: 'demo.db', location: 'default'});
db.transaction(function(tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS DemoTable (name, score)');
}, function(error) {
alert('Transaction ERROR: ' + error.message);
}, function() {
alert('Tabla creada!');
});
What I get in iOS 9.3 is an alert that says: "Table created!", but when I try it in iOS 10 I do not get no result.