title: Can I use indexedDB in a cordova iOS application?
body: <p>I'm getting an <code>InvalidAccessError</code> when I try to open a Indexed Database in my cordova iOS application.</p>
  
  <p>Platform: </p>
  
  <ul>
  <li>cordova: 5.4.1</li>
  <li>cordova-ios: 4.0.1</li>
  <li>iOS 9.2 (simulator and real device)</li>
  </ul>
  
  <p>I already added the <a href="https://www.npmjs.com/package/cordova-plugin-wkwebview-engine" rel="noreferrer">Plugin to use the WKWebview</a> which made the the indexedDB object at least defined, but the error is thrown. The code works in chrome, safari and mobile safari if I run it via cordova's own web server.</p>
  
  <p>config.xml looks like this</p>
  
  <pre><code>&lt;content src="index.html" /&gt;
  &lt;plugin name="cordova-plugin-whitelist" spec="1" /&gt;
  &lt;access origin="*" /&gt;
  &lt;allow-intent href="http://*/*" /&gt;
  &lt;allow-intent href="https://*/*" /&gt;
  &lt;allow-intent href="tel:*" /&gt;
  &lt;allow-intent href="sms:*" /&gt;
  &lt;allow-intent href="mailto:*" /&gt;
  &lt;allow-intent href="geo:*" /&gt;
  &lt;platform name="android"&gt;
      &lt;allow-intent href="market:*" /&gt;
  &lt;/platform&gt;
  &lt;platform name="ios"&gt;
      &lt;allow-intent href="itms:*" /&gt;
      &lt;allow-intent href="itms-apps:*" /&gt;
  &lt;/platform&gt;
  &lt;feature name="CDVWKWebViewEngine"&gt;
      &lt;param name="ios-package" value="CDVWKWebViewEngine" /&gt;
  &lt;/feature&gt;
  
  &lt;preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" /&gt;
  </code></pre>
  
  <p>and I try to open the indexedDB with this:</p>
  
  <pre><code>openDb: function() {
      var openRequest = window.indexedDB.open(DB_NAME, DB_VERSION);
      openRequest.onupgradeneeded = function(event) {
          console.log('upgrade needed');
          console.log(event);
          myIndexDb = event.target.result;
          var options = {
              autoIncrement: true,
              keyPath: 'key'
          };
          var objectStore = myIndexDb.createObjectStore(DB_STORE_NAME, options);
      };
      openRequest.onerror = function(event) {
          console.log(event);
          console.log('indexDB open Error!');
      };
      openRequest.onsuccess = function(event) {
          console.log('open success');
          myIndexDb = this.result;
      };
      openRequest.onblocked = function(event) {
          console.log('request is blocked');
          console.log(event);
      }
  }
  </code></pre>