title: Cordova deviceready not firing in iOS until interacting with iOS
body: <p>I had a really weird bug where deviceready event would not fire in an iOS device until the user interacted with the OS itself, this is, pressing the front button, show the notification center with drag down or go to device settings dragging up.</p>
  
  <p>As soon as the user started dragging the iOS notification center, then deviceready fired.</p>
  
  <p>Something as simple as this would just not work:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" /&gt;
    &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data:* gap:* tel:* 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'" /&gt;
  
    &lt;title&gt;&lt;/title&gt;
  
    &lt;!-- cordova script (this will be a 404 during development) --&gt;
    &lt;script src="cordova.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="log"&gt;&lt;/div&gt;
  
    &lt;script type="text/javascript"&gt;
      var log = document.getElementById("log");
      if(window.cordova){
          log.innerHTML = "with cordova";
          document.addEventListener("deviceready", function onDeviceReady(){
              log.innerHTML = "deviceready";
          }, false);
      }else{
          log.innerHTML = "with browser";
      }
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>