Software Archive
Read-only legacy content
17061 Discussions

ios indexeddb problem

Jörg_G_
Beginner
404 Views

Hi,

i develop a Little app with an indexedDb Database. I am Import the plugin: "cordova-plugin-indexedDB" (0.1.2) and the IDE automatic Import the plugin "cordova-plugin-websql" (0.0.10).

On emulate Devices the app works fine. On Chrome too. The build end wiht no Errors and i can install the app on my iPhone 6 IOS 9.3.2. The App starts but no data stored in the database. 

Build Log

  • Building a Cordova 5.4.1 application.
  • Using platform cordova-ios 4.0.1.
  • The application name is "dumbo"
  • The package name is "de.schumannsolutions.u18"
  • Plugin "cordova-plugin-statusbar" (2.1.0) installed.
  • Plugin "cordova-plugin-device" (1.1.1) installed.
  • Plugin "cordova-plugin-splashscreen" (3.2.0) installed.
  • Plugin "cordova-plugin-indexedDB" (0.1.2) installed.
  • Plugin "cordova-plugin-websql" (0.0.10) installed.
  • Targeting iOS version 8.0.

 

any idea ? Thanks

 

 

 

 

 

 

 

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
404 Views

Many people prefer to use the SQLite plugin (see the featured plugins list -- cordova-sqlite-storage).

0 Kudos
Valerio_P_1
Beginner
404 Views

This is the code to work with Android and IOS. The "Cordova VKWebView Engine" is incompatible with IndexedDB then you do not use it.

document.addEventListener(
    "app.Ready",
    function(){
         if(window.device.platform !== 'Android'){
            window.shimIndexedDB.__useShim();
        }
        createLocalDB();
    },
    false
);

var db=null;

function createLocalDB(){
    db=null;
    var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
    var request = indexedDB.open(LOCAL_DB_NAME, LOCAL_DB_VERSION);
    request.onupgradeneeded = function(){
        db = request.result;
        // from heare, create your objectStore
    }
    request.onsuccess = function(){
        console.log("Success");
    }
    request.onerror = function(){
        console.log("Error in indexedDB");
    }
}

0 Kudos
Daniele_A_
Beginner
404 Views
up ^ i have the same problem in iphone with ios 9 ... when i try to create database he can't i use various plug in no way....There is news about ios and indexdb?? Wich plug in it's best to use? Regards
0 Kudos
Reply