title: Cordova deviceready not firing in iOS
body: <p>I am using Ionic to build my hybrid app.
  On Android my app is running quite fine. Now I was building it for iOS but my entire content that is wrapped inside </p>
  
  <pre><code>document.addEventListener('deviceready', function () {
    console.log('dashboard -&gt; device ready');
    // copy database to the device
    DbAccess.copyDb();
  }, false);
  </code></pre>
  
  <p>is not fired in iOS.</p>
  
  <p>I tried it then with the iOS simulator</p>
  
  <pre><code>$ ionic emulate ios --livereload
  </code></pre>
  
  <p>and checked the console.log.</p>
  
  <p>Result:</p>
  
  <pre><code>1     709252   log      deviceready has not fired after 5 seconds.
  2     709253   log      Channel not fired: onCordovaInfoReady
  </code></pre>
  
  <p>I followed the suggestions I found here and via Google but unfortunately without any success (removing ios and re-adding, etc)</p>
  
  <p>My versions:</p>
  
  <pre><code>Cordova: 6.1.1
  Ionic: 1.7.14
  </code></pre>
  
  <p>My Security setup in my index.html:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src  'self' 'unsafe-inline' *"&gt;
  </code></pre>
  
  <p>Inside my config.xml:</p>
  
  <p></p>
  
  <pre><code>&lt;access origin="geo:*" launch-external="yes"/&gt;
  &lt;access origin="tel:*" launch-external="yes"/&gt;
  &lt;access origin="mailto:*" launch-external="yes"/&gt;
  </code></pre>
  
  <p>I really have no idea where I could go on to solve that bug. Maybe it is something with the Content-Security-Policy but I have no idea how to fix that.</p>
  
  <p>Thanks in advance for your help!</p>
  
  <p>Edit:
  I wrapped my controller(s) now inside </p>
  
  <pre><code>$ionicPlatform.ready(function() {...});
  </code></pre>
  
  <p>e.g.:</p>
  
  <pre><code>    var dashboardCtrl = function ($scope, $ionicPlatform, $cordovaDevice, DbAccess) {
        console.log('dashboardCtrl');
        $ionicPlatform.ready(function () {
          console.log('dashboard -&gt; platform ready');
          document.addEventListener('deviceready', function () {
            console.log('dashboard -&gt; device ready');
            // copy database to the device
            DbAccess.copyDb();
          }, false);
        });
      };
      dashboardCtrl.$inject = ['$scope', '$ionicPlatform', '$cordovaDevice', 'DbAccess'];
  </code></pre>
  
  <p>It still fails and throws the "deviceready" error in the console.log while I am testing it with the iOS simulator.</p>