title: Cordova iOS onResume firing at startup and crashing app
body: <p>I'm currently just building for iOS 8+ and I'm testing on an iPhone 6, and 6S+ in the emulator. I'm using the command line to build and run, and I'm using the Cordova CLI. I've also dipped into XCode a few times to check capabilities, or fix provisioning issues.</p>
  
  <p>This isn't the first app I've build using Cordova, and I've previously been able to use the resume event without issue.</p>
  
  <p>I'm using <code>document.addEventListener("resume", onResume(), false);</code> to fire certain functions when my app resumes. However this function is firing on first launch, and not firing at all on startup. It seems to be anytime the resume function fires it crashes my app.</p>
  
  <p>I've reduced my app down to bare bones, nothing is happening in the onResume function now except the following:</p>
  
  <pre><code>function onResume() {
      setTimeout(function(){
          console.log('App resumed');
      },0);   
  }
  </code></pre>
  
  <p>Going a little out of my mind here. I have the following plugins installed.</p>
  
  <ul>
  <li>com.telerik.plugins.healthkit 0.4.2 "HealthKit"</li>
  <li>cordova-plugin-console 1.0.2 "Console"</li>
  <li>cordova-plugin-splashscreen 3.1.0 "Splashscreen"</li>
  <li>cordova-plugin-statusbar 2.1.1 "StatusBar"</li>
  <li>cordova-plugin-webserver 1.0.3 "CordovaWebServer"</li>
  <li>cordova-plugin-whitelist 1.2.1 "Whitelist"</li>
  </ul>